Analyzing ecap signals

ABSTRACT

Systems, devices, and techniques are described for analyzing evoked compound action potentials (ECAP) signals to assess the effect of a delivered electrical stimulation signal. In one example, a system includes processing circuitry configured to receive ECAP information representative of an ECAP signal sensed by sensing circuitry, and determine, based on the ECAP information, that the ECAP signal includes at least one of an N 2  peak, P 3  peak, or N 3  peak. The processing circuitry may then control delivery of electrical stimulation based on at least one of the N 2  peak, P 3  peak, or N 3  peak.

This application is a continuation of U.S. Pat. Application No.17/409,455, filed Aug. 23, 2021, which claims the benefit of U.S.Provisional Pat. Application No. 63/073,678, filed Sep. 2, 2020, theentire content of both are incorporated herein by reference.

TECHNICAL FIELD

This disclosure generally relates to sensing physiological parameters,and more specifically, analysis of a sensed signal indicative of aphysiological parameter.

BACKGROUND

Medical devices may be external or implanted and may be used to deliverelectrical stimulation therapy to patients via various tissue sites totreat a variety of symptoms or conditions such as chronic pain, tremor,Parkinson’s disease, epilepsy, urinary or fecal incontinence, sexualdysfunction, obesity, or gastroparesis. A medical device may deliverelectrical stimulation therapy via one or more leads that includeelectrodes located proximate to target locations associated with thebrain, the spinal cord, pelvic nerves, peripheral nerves, or thegastrointestinal tract of a patient. Stimulation proximate the spinalcord, proximate the sacral nerve, within the brain, and proximateperipheral nerves are often referred to as spinal cord stimulation(SCS), sacral neuromodulation (SNM), deep brain stimulation (DBS), andperipheral nerve stimulation (PNS), respectively.

Electrical stimulation may be delivered to a patient by the medicaldevice in a train of electrical pulses, and parameters of the electricalpulses may include a frequency, an amplitude, a pulse width, and a pulseshape. An evoked compound action potential (ECAP) is synchronous firingof a population of neurons which occurs in response to the applicationof a stimulus including, in some cases, an electrical stimulus by amedical device. The ECAP may be detectable as being a separate eventfrom the stimulus itself, and the ECAP may reveal characteristics of theeffect of the stimulus on the nerve fibers.

SUMMARY

In general, systems, devices, and techniques are described for analyzingevoked compound action potentials (ECAP) signals to assess the effect ofa delivered electrical stimulation signal. A system may then use one ormore characteristics of the ECAP signal as feedback to adjust andcontrol subsequent electrical stimulation delivered to a patient. When apatient moves, the distance between implanted electrodes and targetnerves changes. For example, electrodes implanted along the spinalcolumn are closer to the spinal cord when a subject lies in a supineposture state as compared to a standing posture state. Similarly, theimplanted electrodes may move closer to the spinal cord when a subjectcoughs or sneezes. Therefore, one or more characteristics of the ECAPsignal changes according to the stimulation pulse that evoked the ECAPsignal and the distance between the electrodes and the nerves.

Devices and systems described herein first analyze an ECAP signal todetermine which features should be identified and used to determine oneor more characteristics of the ECAP signal that can be effective forfeedback in a closed-loop control system. The ECAP signal may includeone or more detectable positive peaks and one or more detectablenegative peaks identified in increasing latency from the stimulus as theP1, N1, P2, N2, P3, N3, etc. peaks. In some examples, the pulse width ofthe stimulation pulse that elicits the ECAP signal is too long and isdetected as an artifact that partially or completely covers one or moreof the peaks. In this situation, a system (e.g., an implantable medicaldevice (IMD) may utilize later occurring peaks (e.g., N2, P3, N3, etc.)in the ECAP signal to determine the characteristic value of the ECAPsignal. The system may select the peaks of the ECAP signal that aregreater than a threshold distance (or time) from the artifact to avoidcorruption in ECAP feature assessment that can occur due to theproximity of the artifact. In some examples, the system can increase thepulse width of the stimulation pulse eliciting ECAP signals until lateroccurring peaks are detected. The system may then determine acharacteristic value of the ECAP signal based on one or more of theselected peaks (e.g., the amplitude between the P2/N2, N2/P3, or P3/N3pairs) and adjust one or more parameter values that define subsequentelectrical stimulation based on the characteristic value.

In one example, a system includes processing circuitry configured toreceive evoked compound action potential (ECAP) informationrepresentative of an ECAP signal sensed by sensing circuitry; determine,based on the ECAP information, that the ECAP signal includes at leastone of an N2 peak, P3 peak, or N3 peak; and control delivery ofelectrical stimulation based on at least one of the N2 peak, P3 peak, orN3 peak.

In another example, a method includes receiving, by processingcircuitry, evoked compound action potential (ECAP) informationrepresentative of an ECAP signal sensed by sensing circuitry;determining, by the processing circuitry and based on the ECAPinformation, that the ECAP signal includes at least one of an N2 peak,P3 peak, or N3 peak; and controlling, by the processing circuitry,delivery of electrical stimulation based on at least one of the N2 peak,P3 peak, or N3 peak.

In another example, a computer-readable medium includes instructionsthat, when executed, causes processing circuitry to receive evokedcompound action potential (ECAP) information representative of an ECAPsignal sensed by sensing circuitry; determine, based on the ECAPinformation, that the ECAP signal includes at least one of an N2 peak,P3 peak, or N3 peak; and control delivery of electrical stimulationbased on at least one of the N2 peak, P3 peak, or N3 peak.

The summary is intended to provide an overview of the subject matterdescribed in this disclosure. It is not intended to provide an exclusiveor exhaustive explanation of the systems, device, and methods describedin detail within the accompanying drawings and description below.Further details of one or more examples of this disclosure are set forthin the accompanying drawings and in the description below. Otherfeatures, objects, and advantages will be apparent from the descriptionand drawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram illustrating an example system thatincludes an implantable medical device (IMD) configured to deliverspinal cord stimulation (SCS) therapy and an external programmer, inaccordance with one or more techniques of this disclosure.

FIG. 2 is a block diagram illustrating an example configuration ofcomponents of an IMD, in accordance with one or more techniques of thisdisclosure.

FIG. 3 is a block diagram illustrating an example configuration ofcomponents of an example external programmer, in accordance with one ormore techniques of this disclosure.

FIG. 4 is a graph of example evoked compound action potentials (ECAPs)sensed for respective stimulation pulses, in accordance with one or moretechniques of this disclosure.

FIG. 5A includes graphs of example ECAP signals and respective featuresfor different subjects, in accordance with one or more techniques ofthis disclosure.

FIG. 5B is a graph of example ECAP signals and respective features of asubject, in accordance with one or more techniques of this disclosure.

FIG. 6 is a timing diagram illustrating one example of electricalstimulation pulses and respective sensed ECAPs, in accordance with oneor more techniques of this disclosure.

FIG. 7 is a flow diagram illustrating an example technique forcontrolling delivery of stimulation if certain peaks are present in anECAP signal, in accordance with one or more techniques of thisdisclosure.

FIG. 8 is a flow diagram illustrating an example technique for adjustingpulse width of stimulation pulses until desired peaks are detected inECAP signals, in accordance with one or more techniques of thisdisclosure.

FIG. 9 is a flow diagram illustrating an example technique for determinewhich peaks of an ECAP signal to use as feedback for controllingelectrical stimulation, in accordance with one or more techniques ofthis disclosure.

FIG. 10 is a diagram illustrating an example technique for adjustingstimulation therapy, in accordance with one or more techniques of thisdisclosure.

FIG. 11 is a flow diagram illustrating the example technique foradjusting stimulation therapy as shown in the diagram of FIG. 10 .

FIG. 12 is a flow diagram illustrating the example technique foradjusting stimulation therapy in accordance with one or more techniquesof this disclosure.

DETAILED DESCRIPTION

The disclosure describes examples of medical devices, systems, andtechniques for analyzing evoked compound action potentials (ECAP)signals to assess the effect of a delivered electrical stimulationsignal. Electrical stimulation therapy is typically delivered to atarget tissue (e.g., nerves of the spinal cord or muscle) of a patientvia two or more electrodes. Parameters of the electrical stimulationtherapy (e.g., electrode combination, voltage or current amplitude,pulse width, pulse frequency, etc.) are selected by a clinician and/orthe patient to provide relief from various symptoms, such as pain,nervous system disorders, muscle disorders, etc. However, as the patientmoves, the distance between the electrodes and the target tissueschanges. Since neural recruitment at the nerves is a function ofstimulation intensity (e.g., amplitude and/or pulse frequency) anddistance between the target tissue and the electrodes, movement of theelectrode closer to the target tissue may result in increased neuralrecruitment (e.g., possible painful sensations or adverse motorfunction), and movement of the electrode further from the target tissuemay result in decreased efficacy of the therapy for the patient. Certainpatient postures (which may or may not include patient activity) may berepresentative of respective distances (or changes in distance) betweenelectrodes and nerves and thus be an informative feedback variable formodulating stimulation therapy.

ECAPs are a measure of neural recruitment because each ECAP signalrepresents the superposition of electrical potentials generated from apopulation of axons firing in response to an electrical stimulus (e.g.,a stimulation pulse). Changes in a characteristic (e.g., an amplitude ofa portion of the signal or area under the curve of the signal) of anECAP signals occur as a function of how many axons have been activatedby the delivered stimulation pulse. For a given set of parameter valuesthat define the stimulation pulse and a given distance between theelectrodes and target nerve, the detected ECAP signal may have a certaincharacteristic value (e.g., amplitude). Therefore, a system candetermine that the distance between electrodes and nerves has increasedor decreased in response to determining that the measured ECAPcharacteristic value has increased or decreased. For example, if the setof parameter values stays the same and the ECAP characteristic value ofamplitude increases, the system can determine that the distance betweenelectrodes and the nerve has decreased.

In some examples, effective stimulation therapy may rely on a certainlevel of neural recruitment at a target nerve. This effectivestimulation therapy may provide relief from one or more conditions(e.g., patient perceived pain) without an unacceptable level of sideeffects (e.g., overwhelming perception of stimulation). If the patientchanges posture or otherwise engages in physical activity, the distancebetween the electrodes and the nerve changes as well. This change indistance can cause loss of effective therapy and/or side effects if theparameter values that define stimulation pulses are not adjusted tocompensate for the change in distance. A system may change stimulationparameters to compensate for changes to the distance between electrodesand the target nerve, such as increasing stimulation intensity inresponse the distance increases and decreasing stimulation intensity inresponse to the distance decreasing.

Although the system may adjust one or more stimulation parametersaccording to the one or more characteristics of the sensed ECAP signalto compensate for the change in distance between electrodes and nerves,the precision of such adjustments is dependent on accurately determiningthe characteristics of the ECAP signal. However, the ability to resolvefeatures of the ECAP signal may be affected by contamination by thestimulation artifact (e.g., the detected stimulation pulse overlappingwith at least a portion of one or more peaks of the ECAP signal). Thiscontamination becomes more significant with wider pulses, as thestimulation artifact progressively effaces the N1 and P2 features of theECAP signal. The end result is reduced amplitudes of the N1, and in someexamples the P2 peak, which results in lower amplitude differencesbetween the N1 and P2 peaks (e.g., lower signal to noise ratio). In someexamples, shorter pulses may limit the effect of the artifact on the N1or P2 peaks, but shorter pulse widths require larger amplitudes toelicit an ECAP signal and may be more perceptible by the patient.

As described herein, systems, devices, and techniques are described foranalyzing an ECAP signal sensed from the patient in order to determineone or more characteristic values of the ECAP signal. A medical device,such as an implantable medical device, may analyze the ECAP signal todetermine which one or more features of the ECAP signal should be usedto determine a characteristic value for the ECAP signal. In cases wherethe N1 and/or P2 peak is encumbered (or affected) by artifact or alonger pulse width is desired for the stimulation pulse, the medicaldevice may utilize later occurring features in the ECAP signal, such asthe N2, P3, and/or N3 peak. These later occurring features may beresolved as these later features manifest further (or later in time)from the artifact. These later occurring features of the ECAP signal aregenerally smaller in amplitude than the N1 and P2 peaks and may not bepresent in detected ECAP signals from all subjects. A neurophysiologiceffect which aids sensing of the ECAP with wider pulse widths is thatthe onset of neural activation is a function of the charge sourced ontothe neural target. The latency of an ECAP signal resulting from a higheramplitude, narrow stimulus will be shorter than that of a loweramplitude, wider stimulus constant charge. This effect allows longerstimulation pulse widths to be used, with acceptable encroachment by thestimulation artifact, than would be possible if the ECAP signal alwaysoccurred at the same latency with respect to the leading edge of thestimulation pulse.

In this manner, the medical device may determine which features (e.g.,peaks, peak-to-peak amplitudes, area under each peak, etc.) of the ECAPsignal should be used to determine a characteristic value of the ECAPsignal. The amplitude between the N1 and P2 peaks may be used as thecharacteristic value of an ECAP signal. However, the medical device candetermine when the stimulation artifact encumbers one or both of the N1and P2 peaks. Such an encumbrance may reduce the amplitudes of, and/orcorrupt, one or both of the N1 and P2 peaks and prevent an accuratedetermination of the ECAP signal. The medical device may determine thatthe stimulation artifact encumbers the N1 or P2 peaks in response todetermining that the distance, or time, from the stimulation artifact tothe N1 and/or P2 peak is less than a predetermined distance or time. Ifthe medical device determines that one or more of the later occurringpeaks (e.g., N2, P3, N3, etc.) in the ECAP signal is detectable, themedical device may use one or more of these later occurring peaks todetermine the characteristic value of the ECAP signal. In this manner,the system may select the peaks of the ECAP signal that are greater thana threshold distance (or time) from the artifact to avoid reduction inpeak amplitude that can occur due to the proximity of the artifact.

In some examples, the medical device can increase the pulse width of thestimulation pulse eliciting ECAP signals until later occurring peaks aredetected. The medical device may perform this increase the pulse widthin response to determination that the stimulation artifact encumbers anearlier occurring peak (e.g., the N1 or P2 peak). In other examples, themedical device may increase the pulse width to identify alternativestimulation parameters that may be less perceptible, or more acceptableto, the subject for eliciting detectable ECAP signals. For example,wider pulse widths may require lower amplitudes to elicit a detectableECAP signal. Once the pulse width is long enough for later occurringpeaks to be detected, the system may then determine a characteristicvalue of the ECAP signal based on one or more of the selected peaks(e.g., the amplitude between the P2/N2, N2/P3, or P3/N3 pairs) andadjust one or more parameter values that define subsequent electricalstimulation based on the characteristic value.

The IMD may utilize the characteristic value of the ECAP signal asfeedback that informs one or more aspects of electrical stimulation,such as intensity of subsequent electrical stimulation therapy. Forexample, the IMD may adjust one or more parameter values that definesubsequent electrical stimulation based on the characteristic value. TheIMD may monitor the characteristic values from respective ECAP signalsover time and increase or decrease parameter values in order to maintaina target characteristic value or range of values. In another example,the IMD may monitor the characteristic values from ECAP signals overtime and reduce a stimulation parameter value when the characteristicvalue exceeds a threshold in order to reduce the likelihood ofoverstimulation as perceived by the patient. The IMD may employ these orother control policies based on the determined characteristic value fromsensed ECAP signals.

In some examples, the ECAPs detected by an IMD may be ECAPs elicited bystimulation pulses intended to contribute to therapy of a patient orseparate pulses configured to elicit ECAPs that are detectable by theIMD. Nerve impulses detectable as the ECAP signal travel quickly alongthe nerve fiber after the delivered stimulation pulse first depolarizesthe nerve. If the stimulation pulse delivered by first electrodes has apulse width that is too long, different electrodes configured to sensethe ECAP will sense the stimulation pulse itself as an artifact (e.g.,detection of delivered charge itself as opposed to detection of aphysiological response to the delivered stimulus) that obscures most orall of the lower amplitude ECAP signal. However, the ECAP signal losesfidelity as the electrical potentials propagate from the electricalstimulus because different nerve fibers propagate electrical potentialsat different speeds. Therefore, sensing the ECAP at a far distance fromthe stimulating electrodes may avoid the artifact caused by astimulation pulse with a long pulse width, but the ECAP signal may losefidelity needed to detect changes to the ECAP signal that occur when theelectrode to target tissue distance changes. In other words, the systemmay not be able to identify, at any distance from the stimulationelectrodes, ECAPs from stimulation pulses configured to provide atherapy to the patient.

In some examples, ECAPs are detectable from pulses intended tocontribute to the therapy of a patient. However, when these therapypulses cause artifacts that interfere with the IMD’s ability to detectthe ECAP, the IMD may be configured to deliver pulses separate frompulses intended to contribute to therapy for the purpose of detectingECAPs without interference from the pulses themselves. The pulsesconfigured to elicit detectable ECAPs may be referred to as controlpulses, and the pulses from which ECAPs are not detectable, butotherwise are adjusted according to characteristics of the ECAP signals,may be referred to as informed pulses. In this manner, the plurality ofcontrol pulses may or may not contribute to therapy received by thepatient, and the informed pulses may generally be configured tocontribute to therapy received by the patient. Therefore, the IMD orother component associated with the medical device may determine valuesof one or more stimulation parameters that at least partially define theinformed pulses based on an ECAP signal elicited by a control pulseinstead. For example, the control pulses may be configured to elicitECAPs used to detect the posture state of the patient. In this manner,the informed pulse may be informed by the ECAP elicited from a controlpulse. The medical device or other component associated with the medicaldevice may determine values of one or more stimulation parameters thatat least partially define the control pulses based on an ECAP signalelicited by previous control pulse.

Although electrical stimulation is generally described herein in theform of electrical stimulation pulses, electrical stimulation may bedelivered in non-pulse form in other examples. For example, electricalstimulation may be delivered as a signal having various waveform shapes,frequencies, and amplitudes. Therefore, electrical stimulation in theform of a non-pulse signal may be a continuous signal than may have asinusoidal waveform or other continuous waveform.

FIG. 1 is a conceptual diagram illustrating an example system 100 thatincludes an implantable medical device (IMD) 110 configured to deliverspinal cord stimulation (SCS) therapy and an external programmer 150, inaccordance with one or more techniques of this disclosure. Although thetechniques described in this disclosure are generally applicable to avariety of medical devices including external devices and IMDs,application of such techniques to IMDs and, more particularly,implantable electrical stimulators (e.g., neurostimulators) will bedescribed for purposes of illustration. More particularly, thedisclosure will refer to an implantable SCS system for purposes ofillustration, but without limitation as to other types of medicaldevices or other therapeutic applications of medical devices.

As shown in FIG. 1 , system 100 includes an IMD 110, leads 130A and130B, and external programmer 150 shown in conjunction with a patient105, who is ordinarily a human patient. In the example of FIG. 1 , IMD110 is an implantable electrical stimulator that is configured togenerate and deliver electrical stimulation therapy to patient 105 viaone or more electrodes of electrodes of leads 130A and/or 130B(collectively, “leads 130”), e.g., for relief of chronic pain or othersymptoms. In other examples, IMD 110 may be coupled to a single leadcarrying multiple electrodes or more than two leads each carryingmultiple electrodes. In some examples, the stimulation signals, orpulses, may be configured to elicit detectable ECAP signals that IMD 110may use to determine the posture state occupied by patient 105 and/ordetermine how to adjust one or more parameters that define stimulationtherapy. IMD 110 may be a chronic electrical stimulator that remainsimplanted within patient 105 for weeks, months, or even years. In otherexamples, IMD 110 may be a temporary, or trial, stimulator used toscreen or evaluate the efficacy of electrical stimulation for chronictherapy. In one example, IMD 110 is implanted within patient 105, whilein another example, IMD 110 is an external device coupled topercutaneously implanted leads. In some examples, IMD 110 uses one ormore leads, while in other examples, IMD 110 is leadless.

IMD 110 may be constructed of any polymer, metal, or composite materialsufficient to house the components of IMD 110 (e.g., componentsillustrated in FIG. 2 ) within patient 105. In this example, IMD 110 maybe constructed with a biocompatible housing, such as titanium orstainless steel, or a polymeric material such as silicone, polyurethane,or a liquid crystal polymer, and surgically implanted at a site inpatient 105 near the pelvis, abdomen, or buttocks. In other examples,IMD 110 may be implanted within other suitable sites within patient 105,which may depend, for example, on the target site within patient 105 forthe delivery of electrical stimulation therapy. The outer housing of IMD110 may be configured to provide a hermetic seal for components, such asa rechargeable or non-rechargeable power source. In addition, in someexamples, the outer housing of IMD 110 is selected from a material thatfacilitates receiving energy to charge the rechargeable power source.

Electrical stimulation energy, which may be constant current or constantvoltage-based pulses, for example, is delivered from IMD 110 to one ormore target tissue sites of patient 105 via one or more electrodes (notshown) of implantable leads 130. In the example of FIG. 1 , leads 130carry electrodes that are placed adjacent to the target tissue of spinalcord 120. One or more of the electrodes may be disposed at a distal tipof a lead 130 and/or at other positions at intermediate points along thelead. Leads 130 may be implanted and coupled to IMD 110. The electrodesmay transfer electrical stimulation generated by an electricalstimulation generator in IMD 110 to tissue of patient 105. Althoughleads 130 may each be a single lead, lead 130 may include a leadextension or other segments that may aid in implantation or positioningof lead 130. In some other examples, IMD 110 may be a leadlessstimulator with one or more arrays of electrodes arranged on a housingof the stimulator rather than leads that extend from the housing. Inaddition, in some other examples, system 100 may include one lead ormore than two leads, each coupled to IMD 110 and directed to similar ordifferent target tissue sites.

The electrodes of leads 130 may be electrode pads on a paddle lead,circular (e.g., ring) electrodes surrounding the body of the lead,conformable electrodes, cuff electrodes, segmented electrodes (e.g.,electrodes disposed at different circumferential positions around thelead instead of a continuous ring electrode), any combination thereof(e.g., ring electrodes and segmented electrodes) or any other type ofelectrodes capable of forming unipolar, bipolar or multipolar electrodecombinations for therapy. Ring electrodes arranged at different axialpositions at the distal ends of lead 130 will be described for purposesof illustration.

The deployment of electrodes via leads 130 is described for purposes ofillustration, but arrays of electrodes may be deployed in differentways. For example, a housing associated with a leadless stimulator maycarry arrays of electrodes, e.g., rows and/or columns (or otherpatterns), to which shifting operations may be applied. Such electrodesmay be arranged as surface electrodes, ring electrodes, or protrusions.As a further alternative, electrode arrays may be formed by rows and/orcolumns of electrodes on one or more paddle leads. In some examples,electrode arrays include electrode segments, which are arranged atrespective positions around a periphery of a lead, e.g., arranged in theform of one or more segmented rings around a circumference of acylindrical lead. In other examples, one or more of leads 130 are linearleads having 8 ring electrodes along the axial length of the lead. Inanother example, the electrodes are segmented rings arranged in a linearfashion along the axial length of the lead and at the periphery of thelead.

The stimulation parameter set of a therapy stimulation program thatdefines the stimulation pulses of electrical stimulation therapy by IMD110 through the electrodes of leads 130 may include informationidentifying which electrodes have been selected for delivery ofstimulation according to a stimulation program, the polarities of theselected electrodes, i.e., the electrode combination for the program,voltage or current amplitude, pulse frequency, pulse width, pulse shapeof stimulation delivered by the electrodes. These stimulation parametersvalues that make up the stimulation parameter set that defines pulsesmay be predetermined parameter values defined by a user and/orautomatically determined by system 100 based on one or more factors oruser input.

If control pulses separate from the informed pulses (together differenttypes of stimulation pulses) used for therapy are needed to elicit adetectable ECAP signal, system 100 may employ an ECAP test stimulationprogram that defines stimulation parameter values that define controlpulses delivered by IMD 110 through at least some of the electrodes ofleads 130. These stimulation parameter values may include informationidentifying which electrodes have been selected for delivery of controlpulses, the polarities of the selected electrodes, i.e., the electrodecombination for the program, and voltage or current amplitude, pulsefrequency, pulse width, and pulse shape of stimulation delivered by theelectrodes. The stimulation signals (e.g., one or more stimulationpulses or a continuous stimulation waveform) defined by the parametersof each ECAP test stimulation program are configured to evoke a compoundaction potential from nerves. In some examples, the ECAP teststimulation program defines when the control pulses are to be deliveredto the patient based on the frequency and/or pulse width of the informedpulses. However, the stimulation defined by each ECAP test stimulationprogram are not intended to provide or contribute to therapy for thepatient. In addition, the ECAP test stimulation program may define thecontrol pulses used for each sweep of pulses that are used to determinethe posture state of the patient.

Although FIG. 1 is directed to SCS therapy, e.g., used to treat pain, inother examples system 100 may be configured to treat any other conditionthat may benefit from electrical stimulation therapy. For example,system 100 may be used to treat tremor, Parkinson’s disease, epilepsy, apelvic floor disorder (e.g., urinary incontinence or other bladderdysfunction, fecal incontinence, pelvic pain, bowel dysfunction, orsexual dysfunction), obesity, gastroparesis, or psychiatric disorders(e.g., depression, mania, obsessive compulsive disorder, anxietydisorders, and the like). In this manner, system 100 may be configuredto provide therapy taking the form of deep brain stimulation (DBS),peripheral nerve stimulation (PNS), peripheral nerve field stimulation(PNFS), cortical stimulation (CS), pelvic floor stimulation,gastrointestinal stimulation, or any other stimulation therapy capableof treating a condition of patient 105.

In some examples, lead 130 includes one or more sensors configured toallow IMD 110 to monitor one or more parameters of patient 105, such aspatient activity, pressure, temperature, or other characteristics. Theone or more sensors may be provided in addition to, or in place of,therapy delivery by lead 130.

IMD 110 is configured to deliver electrical stimulation therapy topatient 105 via selected combinations of electrodes carried by one orboth of leads 130, alone or in combination with an electrode carried byor defined by an outer housing of IMD 110. The target tissue for theelectrical stimulation therapy may be any tissue affected by electricalstimulation, which may be in the form of electrical stimulation pulsesor continuous waveforms. In some examples, the target tissue includesnerves, smooth muscle or skeletal muscle. In the example illustrated byFIG. 1 , the target tissue is tissue proximate spinal cord 120, such aswithin an intrathecal space or epidural space of spinal cord 120, or, insome examples, adjacent nerves that branch off spinal cord 120. Leads130 may be introduced into spinal cord 120 in via any suitable region,such as the thoracic, cervical or lumbar regions. Stimulation of spinalcord 120 may, for example, prevent pain signals from traveling throughspinal cord 120 and to the brain of patient 105. Patient 105 mayperceive the interruption of pain signals as a reduction in pain and,therefore, efficacious therapy results. In other examples, stimulationof spinal cord 120 may produce paresthesia which may be reduce theperception of pain by patient 105, and thus, provide efficacious therapyresults.

IMD 110 is configured to generate and deliver electrical stimulationtherapy to a target stimulation site within patient 105 via theelectrodes of leads 130 to patient 105 according to one or more therapystimulation programs. A therapy stimulation program defines values forone or more parameters (e.g., a parameter set) that define an aspect ofthe therapy delivered by IMD 110 according to that program. For example,a therapy stimulation program that controls delivery of stimulation byIMD 110 in the form of pulses may define values for voltage or currentpulse amplitude, pulse width, pulse rate (e.g., pulse frequency),electrode combination, pulse shape, etc. for stimulation pulsesdelivered by IMD 110 according to that program.

Furthermore, IMD 110 may be configured to deliver control stimulation topatient 105 via a combination of electrodes of leads 130, alone or incombination with an electrode carried by or defined by an outer housingof IMD 110 in order to detect ECAP signals (e.g., control pulses and/orinformed pulses). The tissue targeted by the stimulation may be the sameor similar tissue targeted by the electrical stimulation therapy, butIMD 110 may deliver stimulation pulses for ECAP signal detection via thesame, at least some of the same, or different electrodes. Since controlstimulation pulses can be delivered in an interleaved manner withinformed pulses (e.g., when the pulses configured to contribute totherapy interfere with the detection of ECAP signals or pulse sweepsintended for posture state detection via ECAP signals do not correspondto pulses intended for therapy purposes), a clinician and/or user mayselect any desired electrode combination for informed pulses. Like theelectrical stimulation therapy, the control stimulation may be in theform of electrical stimulation pulses or continuous waveforms. In oneexample, each control stimulation pulse may include a balanced,bi-phasic square pulse that employs an active recharge phase. However,in other examples, the control stimulation pulses may include amonophasic pulse followed by a passive recharge phase. In otherexamples, a control pulse may include an imbalanced bi-phasic portionand a passive recharge portion. Although not necessary, a bi-phasiccontrol pulse may include an interphase interval between the positiveand negative phase to promote propagation of the nerve impulse inresponse to the first phase of the bi-phasic pulse. The controlstimulation may be delivered without interrupting the delivery of theelectrical stimulation informed pulses, such as during the windowbetween consecutive informed pulses. The control pulses may elicit anECAP signal from the tissue, and IMD 110 may sense the ECAP signal viatwo or more electrodes on leads 130. In cases where the controlstimulation pulses are applied to spinal cord 120, the signal may besensed by IMD 110 from spinal cord 120.

IMD 110 can deliver control stimulation to a target stimulation sitewithin patient 105 via the electrodes of leads 130 according to one ormore ECAP test stimulation programs. The one or more ECAP teststimulation programs may be stored in a storage device of IMD 110. EachECAP test program of the one or more ECAP test stimulation programsincludes values for one or more parameters that define an aspect of thecontrol stimulation delivered by IMD 110 according to that program, suchas current or voltage amplitude, pulse width, pulse frequency, electrodecombination, and, in some examples timing based on informed pulses to bedelivered to patient 105. In some examples, the ECAP test stimulationprogram may also define the number of pules and parameter values foreach pulse of multiple pulses within a pulse sweep configured to obtaina plurality of ECAP signals for respective pulses in order to obtain thegrowth curve that IMD 110 may use to determine the current posture stateof the patient. In some examples, IMD 110 delivers control stimulationto patient 105 according to multiple ECAP test stimulation programs.

A user, such as a clinician or patient 105, may interact with a userinterface of an external programmer 150 to program IMD 110. Programmingof IMD 110 may refer generally to the generation and transfer ofcommands, programs, or other information to control the operation of IMD110. In this manner, IMD 110 may receive the transferred commands andprograms from external programmer 150 to control stimulation, such aselectrical stimulation therapy (e.g., informed pulses) and/or controlstimulation (e.g., control pulses). For example, external programmer 150may transmit therapy stimulation programs, ECAP test stimulationprograms, stimulation parameter adjustments, therapy stimulation programselections, ECAP test program selections, user input, or otherinformation to control the operation of IMD 110, e.g., by wirelesstelemetry or wired connection.

In some cases, external programmer 150 may be characterized as aphysician or clinician programmer if it is primarily intended for use bya physician or clinician. In other cases, external programmer 150 may becharacterized as a patient programmer if it is primarily intended foruse by a patient. A patient programmer may be generally accessible topatient 105 and, in many cases, may be a portable device that mayaccompany patient 105 throughout the patient’s daily routine. Forexample, a patient programmer may receive input from patient 105 whenthe patient wishes to terminate or change electrical stimulationtherapy, or when a patient perceives stimulation being delivered. Ingeneral, a physician or clinician programmer may support selection andgeneration of programs by a clinician for use by IMD 110, whereas apatient programmer may support adjustment and selection of such programsby a patient during ordinary use. In other examples, external programmer150 may include, or be part of, an external charging device thatrecharges a power source of IMD 110. In this manner, a user may programand charge IMD 110 using one device, or multiple devices.

As described herein, information may be transmitted between externalprogrammer 150 and IMD 110. Therefore, IMD 110 and external programmer150 may communicate via wireless communication using any techniquesknown in the art. Examples of communication techniques may include, forexample, radiofrequency (RF) telemetry and inductive coupling, but othertechniques are also contemplated. In some examples, external programmer150 includes a communication head that may be placed proximate to thepatient’s body near the IMD 110 implant site to improve the quality orsecurity of communication between IMD 110 and external programmer 150.Communication between external programmer 150 and IMD 110 may occurduring power transmission or separate from power transmission.

In some examples, IMD 110, in response to commands from externalprogrammer 150, delivers electrical stimulation therapy according to aplurality of therapy stimulation programs to a target tissue site of thespinal cord 120 of patient 105 via electrodes (not depicted) on leads130. In some examples, IMD 110 modifies therapy stimulation programs astherapy needs of patient 105 evolve over time. For example, themodification of the therapy stimulation programs may cause theadjustment of at least one parameter of the plurality of informedpulses. When patient 105 receives the same therapy for an extendedperiod, the efficacy of the therapy may be reduced. In some cases,parameters of the plurality of informed pulses may be automaticallyupdated.

In some examples, IMD 110 may detect ECAP signals from pulses deliveredfor the purpose of providing therapy to the patient. In other examples,the pulses configured to provide therapy to the patient may interferewith the detection of the ECAP signals. In this manner, the therapypulses may be referred to as informed pulses because the parametervalues that define the informed pulses may be determined by IMD 110according to ECAP signals elicited from different control pulses.

In one example, each informed pulse may have a pulse width greater thanapproximately 300 µs, such as between approximately 300 µs and 1000 µs(i.e., 1 millisecond) in some examples. At these pulse widths, IMD 110may not sufficiently detect an ECAP signal because the informed pulse isalso detected as an artifact that obscures the ECAP signal. When pulsesintended to provide therapy have these longer pulse widths, IMD 110 maydeliver control stimulation in the form of control pulses in order todetect ECAP signals. The control pulses may have pulse widths of lessthan the interfering therapy pulses (e.g., less than approximately 300µs), such as a bi-phasic pulse with each phase having a duration ofapproximately 100 µs. In some examples, the pulse width (including bothphases) may be from approximately 30 µs to approximately 300 µs. Sincethe control pulses may have shorter pulse widths than the informedpulses, the ECAP signal may be sensed and identified following eachcontrol pulse and used to inform IMD 110 about any changes that shouldbe made to the informed pulses (and control pulses in some examples). Ingeneral, the term “pulse width” refers to the collective duration ofevery phase, and interphase interval when appropriate, of a singlepulse. A single pulse includes a single phase in some examples (i.e., amonophasic pulse) or two or more phases in other examples (e.g., abi-phasic pulse or a tri-phasic pulse). The pulse width defines a periodof time beginning with a start time of a first phase of the pulse andconcluding with an end time of a last phase of the pulse (e.g., abiphasic pulse having a positive phase lasting 100 µs, a negative phaselasting 100 µs, and an interphase interval lasting 30 µs defines a pulsewidth of 230 µs). In other examples, a biphasic pulse may have apositive phase lasting 120 µs, a negative phase lasting 120 µs, and aninterphase interval lasting 30 µs defines a pulse width of 270 µs.

In this disclosure, efficacy of electrical stimulation therapy may beindicated by one or more characteristics of an action potential that isevoked by a stimulation pulse delivered by IMD 110 (i.e., acharacteristic value of the ECAP signal). Electrical stimulation therapydelivery by leads 130 of IMD 110 may cause neurons within the targettissue to evoke a compound action potential that travels up and down thetarget tissue, eventually arriving at sensing electrodes of IMD 110.Furthermore, stimulation pulses (e.g., informed pulses and/or controlpulses) may also elicit at least one ECAP signal, and ECAPs responsiveto control stimulation may also be a surrogate for the effectiveness ofthe therapy and/or the intensity perceived by the patient. The amount ofaction potentials (e.g., number of neurons propagating action potentialsignals) that are evoked may be based on the various parameters ofelectrical stimulation pulses such as amplitude, pulse width, frequency,pulse shape (e.g., slew rate at the beginning and/or end of the pulse),etc. The slew rate may define the rate of change of the voltage and/orcurrent amplitude of the pulse at the beginning and/or end of each pulseor each phase within the pulse. For example, a very high slew rateindicates a steep or even near vertical edge of the pulse, and a lowslew rate indicates a longer ramp up (or ramp down) in the amplitude ofthe pulse. In some examples, these parameters contribute to an intensityof the electrical stimulation. In addition, a characteristic of the ECAPsignal (e.g., an amplitude) may change based on the distance between thestimulation electrodes and the nerves subject to the electrical fieldproduced by the delivered control stimulation pulses.

Example techniques for adjusting stimulation parameter values forinformed pulses (e.g., pulses configured to contribute to therapy forthe patient) are based on comparing the value of a characteristic of ameasured ECAP signal to a target ECAP characteristic value for aprevious control pulse. During delivery of control stimulation pulsesdefined by one or more ECAP test stimulation programs, IMD 110, via twoor more electrodes interposed on leads 130, senses electrical potentialsof tissue of the spinal cord 120 of patient 105 to measure theelectrical activity of the tissue. IMD 110 senses ECAPs from the targettissue of patient 105, e.g., with electrodes on one or more leads 130and associated sense circuitry. In some examples, IMD 110 receives asignal indicative of the ECAP from one or more sensors, e.g., one ormore electrodes and circuitry, internal or external to patient 105. Suchan example signal may include a signal indicating an ECAP of the tissueof patient 105. Examples of the one or more sensors include one or moresensors configured to measure a compound action potential of patient105, or a physiological effect indicative of a compound actionpotential. For example, to measure a physiological effect of a compoundaction potential, the one or more sensors may be an accelerometer, apressure sensor, a bending sensor, a sensor configured to detect aposture of patient 105, or a sensor configured to detect a respiratoryfunction of patient 105. However, in other examples, external programmer150 receives a signal indicating a compound action potential in thetarget tissue of patient 105 and transmits a notification to IMD 110.

In the example of FIG. 1 , IMD 110 described as performing a pluralityof processing and computing functions. However, external programmer 150instead may perform one, several, or all of these functions. In thisalternative example, IMD 110 functions to relay sensed signals toexternal programmer 150 for analysis, and external programmer 150transmits instructions to IMD 110 to adjust the one or more parametersdefining the electrical stimulation therapy based on analysis of thesensed signals. For example, IMD 110 may relay the sensed signalindicative of an ECAP to external programmer 150. External programmer150 may compare the parameter value of the ECAP to the target ECAPcharacteristic value, and in response to the comparison, externalprogrammer 150 may instruct IMD 110 to adjust one or more stimulationparameter that defines the electrical stimulation informed pulses and,in some examples, control pulses, delivered to patient 105.

In the example techniques described in this disclosure, the controlstimulation parameters and the target ECAP characteristic values may beinitially set at the clinic but may be set and/or adjusted at home bypatient 105. For example, the target ECAP characteristics may be changedto match or be a fraction of a stimulation threshold. In some examples,target ECAP characteristics may be specific to respective differentposture states of the patient. Once the target ECAP characteristicvalues are set, the example techniques allow for automatic adjustment ofparameter values that define stimulation pulses (e.g., control pulsesand/or informed pulses) to maintain consistent volume of neuralactivation and consistent perception of therapy for the patient when theelectrode-to-neuron distance changes. The ability to change thestimulation parameter values may also allow the therapy to have longterm efficacy, with the ability to keep the intensity of the stimulation(e.g., as indicated by the ECAP) consistent by comparing the measuredECAP values to the target ECAP characteristic value. In addition, oralternatively, to maintaining stimulation intensity, IMD 110 may monitorthe characteristic values of the ECAP signals to limit one or moreparameter values that define stimulation pulses. IMD 110 may performthese changes without intervention by a physician or patient 105.

In some examples, the system changes the target ECAP characteristicvalue over a period of time, such as according to a change to astimulation threshold (e.g., a perception threshold or detectionthreshold). The system may be programmed to change the target ECAPcharacteristic in order to adjust the intensity of stimulation pulses toprovide varying sensations to the patient (e.g., increase or decreasethe volume of neural activation). Although the system may change thetarget ECAP characteristic value, received ECAP signals may still beused by the system to adjust one or more parameter values of thestimulation pulse (e.g., informed pulses and/or control pulses) in orderto meet the target ECAP characteristic value.

One or more devices within system 100, such as IMD 110 and/or externalprogrammer 150, may perform various functions as described herein. Forexample, IMD 110 may include stimulation circuitry configured to deliverelectrical stimulation, sensing circuitry configured to sense aplurality ECAP signals, and processing circuitry. The processingcircuitry may be configured to control the stimulation circuitry todeliver a plurality of electrical stimulation pulses having differentamplitude values and control the sensing circuitry to detect, afterdelivery of each electrical stimulation pulse of the plurality ofelectrical stimulation pulses, a respective ECAP signal of the pluralityof ECAP signals. The processing circuitry of IMD 110 may then determine,based on the plurality of ECAP signals, a posture state of the patient.

In some examples, IMD 110 may include the stimulation circuitry, thesensing circuitry, and the processing circuitry. However, in otherexamples, one or more additional devices may be part of the system thatperforms the functions described herein. For example, IMD 110 mayinclude the stimulation circuitry and the sensing circuitry, butexternal programmer 150 or other external device may include theprocessing circuitry that at least determines the posture state of thepatient. IMD 110 may transmit the sensed ECAP signals, or datarepresenting the ECAP signal, to external programmer 150, for example.Therefore, the processes described herein may be performed by multipledevices in a distributed system. In some examples, system 100 mayinclude one or more electrodes that deliver and/or sense electricalsignals. Such electrodes may be configured to sense the ECAP signals. Insome examples, the same electrodes may be configured to sense signalsrepresentative of transient movements of the patient. In other examples,other sensors, such as accelerometers, gyroscopes, or other movementsensors may be configured to sense movement of the patient thatindicates the patient may have transitioned to a different posturestate, by which the target characteristic value may have changedaccordingly.

As described herein, the processing circuitry of IMD 110 may beconfigured to determine characteristic values for the plurality of ECAPsignals detected after each of the plurality of electrical stimulationpulses. The characteristic value for each ECAP signal is arepresentation of the ECAP signal.

In some examples, system 100, which may include IMD 110 and/or externalprogrammer 150, includes a stimulation generator configured to deliver astimulation pulse to a patient and sensing circuitry configured to sensethe ECAP signal elicited from the stimulation pulse. System 100 may alsoinclude processing circuitry configured to receive ECAP informationrepresentative of an ECAP signal sensed by sensing circuitry. The ECAPinformation may include digitized portions or all of the ECAP signal,filtered portions of the ECAP signal, or raw data representative of thesensed ECAP signal that can be processed by the processing circuitry.The processing circuitry may determine, based on the ECAP information,that the ECAP signal includes at least one of an N2 peak, P3 peak, or N3peak. These peaks may be latter occurring in the ECAP signal than a P2and N1 peak. Other latter occurring peaks after the N3 peak may bedetected in other examples. The processing circuitry may then controldelivery of electrical stimulation based on at least one of the N2 peak,P3 peak, or N3 peak.

In some examples, the processing circuitry is configured to select atleast one of the N2 peak, P3 peak, or N3 peak based on temporalproximity of a stimulus artifact in the ECAP signal to at least one ofthe N2 peak, P3 peak, or N3 peak. For example, if the stimulus artifactoccurs within a threshold time of the N1 or P2 peak, the processingcircuitry will look to the presence of at least one of the N2 peak, P3peak, or N3 peak. The processing circuitry may then select one or moreof the N2 peak, P3 peak, or N3 peak that occurs more than a thresholdtime from the stimulation artifact. This process may reduce the impactof the stimulation artifact on the ECAP signal features.

In some examples, the processing circuitry is configured to select atleast one of the N2 peak, P3 peak, or N3 peak based on a pulse width ofa stimulation pulse that elicited the ECAP signal. For example, longerpulse widths may interfere with earlier occurring peaks in the ECAPsignal. The processing circuitry may thus select latter occurring N2,P3, N3, or other peaks in the ECAP signal for longer pulse widths of thestimulation pulse to reduce any impact of the stimulation artifact ondetection of selected features of the ECAP signal. The processingcircuitry may determine a characteristic value of the ECAP signal basedon at least one of the N2 peak, P3 peak, or N3 peak. Although a longerpulse width may encumber the N1 peak, the P2 peak may be relativelyunaffected in some examples because it still occurs late enough in theECAP signal. In one example, the processing circuitry is configured todetermine the characteristic value as an amplitude between a P2 peak ofthe ECAP signal and the N2 peak. The amplitude between two peaks refersto the total magnitude (e.g., voltage magnitude) that separates eachpeak. In another example, the processing circuitry is configured todetermine the characteristic value as an amplitude between the N2 peakand the P3 peak. In another example, the processing circuitry isconfigured to determine the characteristic value as an amplitude betweenthe P3 peak and the N3 peak. Peaks that occur later than the N3 peak(e.g., P4, N4, etc.) may be used to determine the characteristic valuein other examples if they are detectable in the sensed ECAP signal. Insome examples, processing circuitry may determine the characteristicvalue according to total, average, weighted average, or othercombinations of two or more pairs of peaks or multiple peaks as measuredfrom a zero baseline.

System 100 may select one or more values of a parameter that definessubsequent stimulation pulses according to one or more characteristicvalues calculated from a sensed ECAP signal. For example, processingcircuitry may be configured to determine a difference between thecharacteristic value of the ECAP signal and a target ECAP characteristicvalue. The target ECAP characteristic value may be a target ECAPcharacteristic value that indicates appropriate stimulation intensityfor the patient. The processing circuitry can then calculate, based onthe difference, at least one parameter value that at least partiallydefines the electrical stimulation. The processing circuitry can thencontrol delivery of the electrical stimulation to patient 105 accordingto the at least one parameter value that was determined from thecharacteristic value of the ECAP signal. For example, the processingcircuitry may control stimulation circuitry of IMD 110 to deliver theelectrical stimulation. The processing circuitry may continue thisprocess such that the characteristic values of the ECAP signals arefeedback into a closed-loop policy that controls one or more parametersof electrical stimulation.

Although in one example IMD 110 takes the form of an SCS device, inother examples, IMD 110 takes the form of any combination of deep brainstimulation (DBS) devices, implantable cardioverter defibrillators(ICDs), pacemakers, cardiac resynchronization therapy devices (CRT-Ds),left ventricular assist devices (LVADs), implantable sensors, orthopedicdevices, or drug pumps, as examples. Moreover, techniques of thisdisclosure may be used to determine stimulation thresholds (e.g.,perception thresholds and detection thresholds) associated any one ofthe aforementioned IMDs and then use a stimulation threshold to informthe intensity (e.g., stimulation levels) of therapy.

FIG. 2 is a block diagram illustrating an example configuration ofcomponents of an IMD 200, in accordance with one or more techniques ofthis disclosure. IMD 200 may be an example of IMD 110 of FIG. 1 . In theexample shown in FIG. 2 , IMD 200 includes stimulation generationcircuitry 202, switch circuitry 204, sensing circuitry 206, telemetrycircuitry 208, processing circuitry 210, storage device 212, sensor(s)222, and power source 224.

In the example shown in FIG. 2 , storage device 212 stores patient data240, stimulation parameter settings 242, and ECAP detection instructions244 in separate memories within storage device 212 or separate areaswithin storage device 212. Patient data 240 may include parametervalues, target characteristic values, or other information specific tothe patient. In some examples, stimulation parameter settings 242 mayinclude stimulation parameter values for respective differentstimulation programs selectable by the clinician or patient for therapy.In this manner, each stored therapy stimulation program, or set ofstimulation parameter values, of stimulation parameter settings 242defines values for a set of electrical stimulation parameters (e.g., astimulation parameter set), such as a stimulation electrode combination,electrode polarity, current or voltage amplitude, pulse width, pulserate, and pulse shape. Storage device 212 may also store ECAP detectioninstructions 244 that defines values for a set of electrical stimulationparameters (e.g., a control stimulation parameter set) configured toelicit a detectable ECAP signal, such as a stimulation electrodecombination, electrode polarity, current or voltage amplitude, pulsewidth, pulse rate, and pulse shape. ECAP detection instructions 244 mayalso have additional information such as instructions regarding when todeliver control pulses based on the pulse width and/or frequency of theinformed pulses defined in stimulation parameter settings 242, detectionwindows for detecting ECAP signals, instructions for determiningcharacteristic values from ECAP signals, etc. For example, ECAPdetection instructions 244 may define that characteristic values of ECAPsignals are to be determined based on which peaks are present in theECAP signal, encroachment of stimulation artifact on one or more peaks,or desired pulse widths of stimulation, as described herein.

Accordingly, in some examples, stimulation generation circuitry 202generates electrical stimulation signals in accordance with theelectrical stimulation parameters noted above. Other ranges ofstimulation parameter values may also be useful and may depend on thetarget stimulation site within patient 105. While stimulation pulses aredescribed, stimulation signals may be of any form, such ascontinuous-time signals (e.g., sine waves) or the like. Switch circuitry204 may include one or more switch arrays, one or more multiplexers, oneor more switches (e.g., a switch matrix or other collection ofswitches), or other electrical circuitry configured to directstimulation signals from stimulation generation circuitry 202 to one ormore of electrodes 232, 234, or directed sensed signals from one or moreof electrodes 232, 234 to sensing circuitry 206. In other examples,stimulation generation circuitry 202 and/or sensing circuitry 206 mayinclude sensing circuitry to direct signals to and/or from one or moreof electrodes 232, 234, which may or may not also include switchcircuitry 204.

Sensing circuitry 206 is configured to monitor signals from anycombination of electrodes 232, 234. In some examples, sensing circuitry206 includes one or more amplifiers, filters, and analog-to-digitalconverters. Sensing circuitry 206 may be used to sense physiologicalsignals, such as ECAP signals. In some examples, sensing circuitry 206detects ECAPs from a particular combination of electrodes 232, 234. Insome cases, the particular combination of electrodes for sensing ECAPsincludes different electrodes than a set of electrodes 232, 234 used todeliver stimulation pulses. Alternatively, in other cases, theparticular combination of electrodes used for sensing ECAPs includes atleast one of the same electrodes as a set of electrodes used to deliverstimulation pulses to patient 105. Sensing circuitry 206 may providesignals to an analog-to-digital converter, for conversion into a digitalsignal for processing, analysis, storage, or output by processingcircuitry 210.

Telemetry circuitry 208 supports wireless communication between IMD 200and an external programmer (not shown in FIG. 2 ) or another computingdevice under the control of processing circuitry 210. Processingcircuitry 210 of IMD 200 may receive, as updates to programs, values forvarious stimulation parameters such as amplitude and electrodecombination, from the external programmer via telemetry circuitry 208.Processing circuitry 210 may store updates to the stimulation parametersettings 242 or any other data in storage device 212. Telemetrycircuitry 208 in IMD 200, as well as telemetry circuits in other devicesand systems described herein, such as the external programmer, mayaccomplish communication by radiofrequency (RF) communicationtechniques. In addition, telemetry circuitry 208 may communicate with anexternal medical device programmer (not shown in FIG. 2 ) via proximalinductive interaction of IMD 200 with the external programmer. Theexternal programmer may be one example of external programmer 150 ofFIG. 1 . Accordingly, telemetry circuitry 208 may send information tothe external programmer on a continuous basis, at periodic intervals, orupon request from IMD 110 or the external programmer.

Processing circuitry 210 may include any one or more of amicroprocessor, a controller, a digital signal processor (DSP), anapplication specific integrated circuit (ASIC), a field-programmablegate array (FPGA), discrete logic circuitry, or any other processingcircuitry configured to provide the functions attributed to processingcircuitry 210 herein may be embodied as firmware, hardware, software orany combination thereof. Processing circuitry 210 controls stimulationgeneration circuitry 202 to generate stimulation signals according tostimulation parameter settings 242 and any other instructions stored instorage device 212 to apply stimulation parameter values specified byone or more of programs, such as amplitude, pulse width, pulse rate, andpulse shape of each of the stimulation signals.

In the example shown in FIG. 2 , the set of electrodes 232 includeselectrodes 232A, 232B, 232C, and 232D, and the set of electrodes 234includes electrodes 234A, 234B, 234C, and 234D. In other examples, asingle lead may include all eight electrodes 232 and 234 along a singleaxial length of the lead. Processing circuitry 210 also controlsstimulation generation circuitry 202 to generate and apply thestimulation signals to selected combinations of electrodes 232, 234. Insome examples, stimulation generation circuitry 202 includes a switchcircuit (instead of, or in addition to, switch circuitry 204) that maycouple stimulation signals to selected conductors within leads 230,which, in turn, deliver the stimulation signals across selectedelectrodes 232, 234. Such a switch circuit may be a switch array, switchmatrix, multiplexer, or any other type of switching circuit configuredto selectively couple stimulation energy to selected electrodes 232, 234and to selectively sense bioelectrical neural signals of a spinal cordof the patient (not shown in FIG. 2 ) with selected electrodes 232, 234.

In other examples, however, stimulation generation circuitry 202 doesnot include a switch circuit and switch circuitry 204 does not interfacebetween stimulation generation circuitry 202 and electrodes 232, 234. Inthese examples, stimulation generation circuitry 202 includes aplurality of pairs of voltage sources, current sources, voltage sinks,or current sinks connected to each of electrodes 232, 234 such that eachpair of electrodes has a unique signal circuit. In other words, in theseexamples, each of electrodes 232, 234 is independently controlled viaits own signal circuit (e.g., via a combination of a regulated voltagesource and sink or regulated current source and sink), as opposed toswitching signals between electrodes 232, 234.

Electrodes 232, 234 on respective leads 230 may be constructed of avariety of different designs. For example, one or both of leads 230 mayinclude one or more electrodes at each longitudinal location along thelength of the lead, such as one electrode at different perimeterlocations around the perimeter of the lead at each of the locations A,B, C, and D. In one example, the electrodes may be electrically coupledto stimulation generation circuitry 202, e.g., via switch circuitry 204and/or switching circuitry of the stimulation generation circuitry 202,via respective wires that are straight or coiled within the housing ofthe lead and run to a connector at the proximal end of the lead. Inanother example, each of the electrodes of the lead may be electrodesdeposited on a thin film. The thin film may include an electricallyconductive trace for each electrode that runs the length of the thinfilm to a proximal end connector. The thin film may then be wrapped(e.g., a helical wrap) around an internal member to form the lead 230.These and other constructions may be used to create a lead with acomplex electrode geometry.

Although sensing circuitry 206 is incorporated into a common housingwith stimulation generation circuitry 202 and processing circuitry 210in FIG. 2 , in other examples, sensing circuitry 206 may be in aseparate housing from IMD 200 and may communicate with processingcircuitry 210 via wired or wireless communication techniques. In someexamples, one or more of electrodes 232 and 234 are suitable for sensingthe ECAPs. For instance, electrodes 232 and 234 may sense the voltageamplitude of a portion of the ECAP signals, where the sensed voltageamplitude, such as the voltage difference between features within thesignal, is a characteristic the ECAP signal.

Storage device 212 may be configured to store information within IMD 200during operation. Storage device 212 may include a computer-readablestorage medium or computer-readable storage device. In some examples,storage device 212 includes one or more of a short-term memory or along-term memory. Storage device 212 may include, for example, randomaccess memories (RAM), dynamic random access memories (DRAM), staticrandom access memories (SRAM), magnetic discs, optical discs, flashmemories, or forms of electrically programmable memories (EPROM) orelectrically erasable and programmable memories (EEPROM). In someexamples, storage device 212 is used to store data indicative ofinstructions for execution by processing circuitry 210. As discussedabove, storage device 212 is configured to store patient data 240,stimulation parameter settings 242, and ECAP detection instructions 244.

In some examples, storage device 212 may store instructions on howprocessing circuitry 210 can adjust stimulation pulses in response tothe determined characteristic values of ECAP signals. For example,processing circuitry 210 may monitor ECAP characteristic values obtainedfrom ECAP signals (or a signal derived from the ECAP signal) to modulatestimulation parameter values (e.g., increase or decrease stimulationintensity to maintain a target therapeutic effect). In some examples, atarget ECAP characteristic value may vary for different situations for apatient, such as different posture states, times of day, activities,etc.

Sensor(s) 222 may include one or more sensing elements that sense valuesof a respective patient parameter, such as posture state. As described,electrodes 232 and 234 may be the electrodes that sense thecharacteristic value of the ECAP signal. Sensor(s) 222 may include oneor more accelerometers, optical sensors, chemical sensors, temperaturesensors, pressure sensors, or any other types of sensors. Sensor(s) 222may output patient parameter values that may be used as feedback tocontrol delivery of therapy. For example, sensor(s) 222 may indicatepatient activity, and processing circuitry 210 may increase thefrequency of control pulses and ECAP sensing in response to detectingincreased patient activity. In one example, processing circuitry 210 mayinitiate control pulses and corresponding ECAP sensing in response to asignal from sensor(s) 222 indicating that patient activity has exceededan activity threshold. Conversely, processing circuitry 210 may decreasethe frequency of control pulses and ECAP sensing in response todetecting decreased patient activity. For example, in response tosensor(s) 222 no longer indicating that the sensed patient activityexceeds a threshold, processing circuitry 210 may suspend or stopdelivery of control pulses and ECAP sensing. In this manner, processingcircuitry 210 may dynamically deliver control pulses and sense ECAPsignals based on patient activity to reduce power consumption of thesystem when the electrode-to-neuron distance is not likely to change andincrease system response to ECAP changes when electrode-to-neurondistance is likely to change. IMD 200 may include additional sensorswithin the housing of IMD 200 and/or coupled via one of leads 130 orother leads. In addition, IMD 200 may receive sensor signals wirelesslyfrom remote sensors via telemetry circuitry 208, for example. In someexamples, one or more of these remote sensors may be external to patient(e.g., carried on the external surface of the skin, attached toclothing, or otherwise positioned external to patient 105). In someexamples, signals from sensor(s) 222 indicate a position or body state(e.g., sleeping, awake, sitting, standing, or the like), and processingcircuitry 210 may select target ECAP characteristic values according tothe indicated position or body state.

Power source 224 is configured to deliver operating power to thecomponents of IMD 200. Power source 224 may include a battery and apower generation circuit to produce the operating power. In someexamples, the battery is rechargeable to allow extended operation. Insome examples, recharging is accomplished through proximal inductiveinteraction between an external charger and an inductive charging coilwithin IMD 200. Power source 224 may include any one or more of aplurality of different battery types, such as nickel cadmium batteriesand lithium ion batteries.

FIG. 3 is a block diagram illustrating an example configuration ofcomponents of an example external programmer 300. External programmer300 may be an example of external programmer 150 of FIG. 1 . Althoughexternal programmer 300 may generally be described as a hand-helddevice, external programmer 300 may be a larger portable device or amore stationary device. In addition, in other examples, externalprogrammer 300 may be included as part of an external charging device orinclude the functionality of an external charging device. As illustratedin FIG. 3 , external programmer 300 may include processing circuitry352, storage device 354, user interface 356, telemetry circuitry 358,and power source 360. Storage device 354 may store instructions that,when executed by processing circuitry 352, cause processing circuitry352 and external programmer 300 to provide the functionality ascribed toexternal programmer 300 throughout this disclosure. Each of thesecomponents, circuitry, or modules, may include electrical circuitry thatis configured to perform some, or all of the functionality describedherein. For example, processing circuitry 352 may include processingcircuitry configured to perform the processes discussed with respect toprocessing circuitry 352.

In general, external programmer 300 includes any suitable arrangement ofhardware, alone or in combination with software and/or firmware, toperform the techniques attributed to external programmer 300, andprocessing circuitry 352, user interface 356, and telemetry circuitry358 of external programmer 300. In various examples, external programmer300 may include one or more processors, such as one or moremicroprocessors, DSPs, ASICs, FPGAs, or any other equivalent integratedor discrete logic circuitry, as well as any combinations of suchcomponents. External programmer 300 also, in various examples, mayinclude a storage device 354, such as RAM, ROM, PROM, EPROM, EEPROM,flash memory, a hard disk, a CD-ROM, including executable instructionsfor causing the one or more processors to perform the actions attributedto them. Moreover, although processing circuitry 352 and telemetrycircuitry 358 are described as separate modules, in some examples,processing circuitry 352 and telemetry circuitry 358 are functionallyintegrated. In some examples, processing circuitry 352 and telemetrycircuitry 358 correspond to individual hardware units, such as ASICs,DSPs, FPGAs, or other hardware units.

Storage device 354 (e.g., a storage device) may store instructions that,when executed by processing circuitry 352, cause processing circuitry352 and external programmer 300 to provide the functionality ascribed toexternal programmer 300 throughout this disclosure. For example, storagedevice 354 may include instructions that cause processing circuitry 352to obtain a parameter set from memory, select a spatial electrodepattern, or receive a user input and send a corresponding command to IMD200, or instructions for any other functionality. In addition, storagedevice 354 may include a plurality of programs, where each programincludes a parameter set that defines therapy stimulation or controlstimulation. Storage device 354 may also store data received from amedical device (e.g., IMD 110). For example, storage device 354 maystore ECAP related data recorded at a sensing module of the medicaldevice, and storage device 354 may also store data from one or moresensors of the medical device.

User interface 356 may include a button or keypad, lights, a speaker forvoice commands, a display, such as a liquid crystal (LCD),light-emitting diode (LED), or organic light-emitting diode (OLED). Insome examples the display includes a touch screen. User interface 356may be configured to display any information related to the delivery ofelectrical stimulation, identified posture states, sensed patientparameter values, or any other such information. User interface 356 mayalso receive user input (e.g., indication of when the patient perceivesa stimulation pulse) via user interface 356. The input may be, forexample, in the form of pressing a button on a keypad or selecting anicon from a touch screen. The input may request starting or stoppingelectrical stimulation, the input may request a new spatial electrodepattern or a change to an existing spatial electrode pattern, of theinput may request some other change to the delivery of electricalstimulation.

Telemetry circuitry 358 may support wireless communication between themedical device and external programmer 300 under the control ofprocessing circuitry 352. Telemetry circuitry 358 may also be configuredto communicate with another computing device via wireless communicationtechniques, or direct communication through a wired connection. In someexamples, telemetry circuitry 358 provides wireless communication via anRF or proximal inductive medium. In some examples, telemetry circuitry358 includes an antenna, which may take on a variety of forms, such asan internal or external antenna.

Examples of local wireless communication techniques that may be employedto facilitate communication between external programmer 300 and IMD 110include RF communication according to the 802.11 or Bluetooth ®specification sets or other standard or proprietary telemetry protocols.In this manner, other external devices may be capable of communicatingwith external programmer 300 without needing to establish a securewireless connection. As described herein, telemetry circuitry 358 may beconfigured to transmit a spatial electrode movement pattern or otherstimulation parameter values to IMD 110 for delivery of electricalstimulation therapy. Although IMD 110 may determine characteristicvalues for ECAP signals and control the adjustment of stimulationparameter values in some examples, programmer 300 may perform thesetasks alone or together with IMD 110 in a distributed function.

In some examples, selection of stimulation parameters or therapystimulation programs are transmitted to the medical device for deliveryto a patient (e.g., patient 105 of FIG. 1 ). In other examples, thetherapy may include medication, activities, or other instructions thatpatient 105 must perform themselves or a caregiver perform for patient105. In some examples, external programmer 300 provides visual, audible,and/or tactile notifications that indicate there are new instructions.External programmer 300 requires receiving user input acknowledging thatthe instructions have been completed in some examples.

User interface 356 of external programmer 300 may also be configured toreceive an indication from a clinician instructing a processor of themedical device to update one or more therapy stimulation programs or toupdate the target characteristic values for ECAP signals. Updatingtherapy stimulation programs and target characteristic values mayinclude changing one or more parameters of the stimulation pulsesdelivered by the medical device according to the programs, such asamplitude, pulse width, frequency, and pulse shape of the informedpulses and/or control pulses. User interface 356 may also receiveinstructions from the clinician commanding any electrical stimulation,including therapy stimulation and control stimulation to commence or tocease. In some examples, user interface 356 may receive user selectionof pulse widths or other stimulation parameter values that definestimulation and/or affect which features of ECAP signals are selected byprogrammer 300 or IMD 200. In other examples, user interface 356 maypresent selectable options, and receive input, for which features of anECAP signal should be used to determine the characteristic values ofECAP signals.

Power source 360 is configured to deliver operating power to thecomponents of external programmer 300. Power source 360 may include abattery and a power generation circuit to produce the operating power.In some examples, the battery is rechargeable to allow extendedoperation. Recharging may be accomplished by electrically coupling powersource 360 to a cradle or plug that is connected to an alternatingcurrent (AC) outlet. In addition, recharging may be accomplished throughproximal inductive interaction between an external charger and aninductive charging coil within external programmer 300. In otherexamples, traditional batteries (e.g., nickel cadmium or lithium ionbatteries) may be used. In addition, external programmer 300 may bedirectly coupled to an alternating current outlet to operate.

The architecture of external programmer 300 illustrated in FIG. 3 isshown as an example. The techniques as set forth in this disclosure maybe implemented in the example external programmer 300 of FIG. 3 , aswell as other types of systems not described specifically herein.Nothing in this disclosure should be construed so as to limit thetechniques of this disclosure to the example architecture illustrated byFIG. 3 .

FIG. 4 is a graph 402 of example evoked compound action potentials(ECAPs) sensed for respective stimulation pulses, in accordance with oneor more techniques of this disclosure. As shown in FIG. 4 , graph 402shows example ECAP signal 404 (dotted line) and ECAP signal 406 (solidline). In some examples, each of ECAP signals 404 and 406 are sensedfrom stimulation pulses that were delivered from a guarded cathode,where the control pulses are bi-phasic pulses including an interphaseinterval between each positive and negative phase of the pulse. In somesuch examples, the guarded cathode includes stimulation electrodeslocated at the end of an 8-electrode lead (e.g., leads 130 of FIG. 1 )while two sensing electrodes are provided at the other end of the8-electrode lead. ECAP signal 404 illustrates the voltage amplitudesensed as a result from a sub-detection threshold stimulation pulse. Inother words, the stimulation pulse did not elicit a detectable ECAPsignal in ECAP signal 404. Peaks 408 of ECAP signal 404 are detected andrepresent the artifact of the delivered stimulation pulse (e.g., acontrol pulse that may or may not contribute to a therapeutic effect forthe patient). However, no propagating signal is detected after theartifact in ECAP signal 404 because the stimulation pulse wassub-detection threshold (e.g., the intensity of the stimulation pulsewas insufficient to cause nerve fibers to depolarize and generate adetectable ECAP signal).

In contrast to ECAP signal 404, ECAP signal 406 represents the voltageamplitude detected from a supra-detection threshold stimulation pulse.Peaks 408 of ECAP signal 406 are detected and represent the artifact ofthe delivered stimulation pulse. After peaks 408, ECAP signal 406 alsoincludes peaks P1, N1, P2, N2, P3, and N3 which are example features(e.g., peaks) representative of propagating action potentials from anECAP. The example duration of the artifact and peaks P1, N1, and P2 isapproximately 1 millisecond (ms), and latter occurring peaks (e.g., N2,P3, and N3) may take longer to develop. In some examples, latteroccurring peaks may not be detectable in all patients or for relativelyshorter pulse widths. In some instances, additional peaks not shown mayoccur. The time between two points in the ECAP signal may be referred toas a latency of the ECAP and may indicate the types of fibers beingcaptured by the control pulse. ECAP signals with lower latency (i.e.,smaller latency values) indicate a higher percentage of nerve fibersthat have faster propagation of signals, whereas ECAP signals withhigher latency (i.e., larger latency values) indicate a higherpercentage of nerve fibers that have slower propagation of signals.Other characteristics of the ECAP signal may be used in other examples.

The amplitude of the ECAP signal (e.g., some or all peaks within theECAP signal) generally increases with increased amplitude of thestimulation pulse, as long as the pulse amplitude is greater thanthreshold such that nerves depolarize and propagate the signal. Thetarget ECAP characteristic (e.g., the target ECAP amplitude) may bedetermined from the ECAP signal detected from a control pulse wheninformed pulses are determined to deliver effective therapy to patient105. The ECAP signal thus is representative of the distance between thestimulation electrodes and the nerves appropriate for the stimulationparameter values of the informed pulses delivered at that time.

FIG. 5A includes graphs of example ECAP signals and respective featuresfor different subjects, in accordance with one or more techniques ofthis disclosure. As shown in the example graph 500 of FIG. 5A, differentstimulation pulses were delivered at different pulse widths for twodifferent sheep subjects, which elicited respective ECAP signals. ECAPsignals 502 correspond to a first sheep, and ECAP signals 504 correspondto a second sheep. The delivered stimulation pulses were produced bypercutaneous 1×8 spinal cord stimulation leads located in the epiduralspace at T8. Balanced biphasic stimulation pules were delivered with aconstant charge of 75 nC/phase on electrode 6 (E6) with respect toelectrode 7 (E7). Averaged differential recordings of thebiopotentials—that is the stimulation artifact and the ECAP generatedfrom the neurostimulation were recorded on E2/E1 from the same lead.These are just example parameters for these subjects, as other exampleparameter values may be used in other examples.

For graphs 500, 510, and 520, averaged ECAP recordings in sheep withswept pulse width stimulation, along with graphs (median and 10th-90thpercentile ranges) of N1-P2 amplitude (plot 510) and N1-P2 latency(separation) (plot 520) as a function of pulse width. Example cathodicphases had a duration of 30 microsecond (µs), 60 µs, 90 µs, 120 µs, 150µs, and 180 µs phase duration. Each cathodic phase had a correspondinganodic phase of similar duration and an interphase interval of 30 µs,and the combination of the cathodic phase, interphase interval, andanodic phase is referred to as the pulse width of the stimulus. In thismanner, the respective pulse widths for each curve were 90 µs, 150 µs,210 µs, 270 µs, 330 µs, and 390 µs. Symbols in graph 500 indicatelocation of N1 (*), P2 (Δ), N2(o), and P3(□).

ECAP signals 502 for the first sheep shows that the N1 and P2 peaks weredetectable for pulse widths from 30 to 180 µs. However, N2 and P3 peakswere only detectable for the 150 µs and 180 µs pulse widths. Similarly,ECAP signals 504 for the second sheep shows that the N1 and P2 peakswere detectable for phase durations from 30 to 180 µs. However, N2 andP3 peaks were only detectable for the 120 µs, 150 µs, and 180 µs phasedurations. Also evident in these recordings is a longer latencycomponent of the ECAP signal, labeled as N2/P3, which manifests atlonger pulses widths in both sheep.

Graph 510 illustrates that the N1/P2 amplitude decreased for the firstsheep (line 512) and the second sheep (line 514) as pulse widthincreased. This is likely due to the wider pulse widths encumbering theN1 and P2 peaks. Graph 520 illustrates that the latency between the N1and P2 peaks also decreased for the first sheep (line 522) and thesecond sheep (line 524) as pulse width increased. This is likely due tothe wider pulse widths ending closer in time to the presence of the N1and P2 peaks. This decline in latency indicates that latency may be usedas a threshold for determining whether or not latter occurring peaksshould be used for the characteristic value of the ECAP signals insteadof N1 and/or P2. For example, in response to determining that thelatency drops below a threshold value, IMD 200 may select peaks thatoccur later in the ECAP signal than N1 (and in some cases P2).

FIG. 5B is a graph 550 of example ECAP signals and respective featuresof a subject, in accordance with one or more techniques of thisdisclosure. As shown in example 5B, graph 550 illustrates ECAP signalsrecorded from a human subject in response to delivery of differentstimulation pulses having varying pulse widths of 90 µs, 120 µs, 150 µs,210 µs, 270 µs, and 300 µs (shown in different curves from top to bottomof graph 550, respectively). The N1 and P2 peaks are present anddetectable in the ECAP signals for all pulse widths. N2 and P3 peaks arealso present and detectable in all of the ECAP signals. However, theamplitudes of N2 and P3 are noticeably greater at all pulse widthsexcept for the shortest 90 µs pulse width. Therefore, the pulse widththat elicits detectable, or usable, latter occurring peaks in the ECAPsignal may be different for different subjects. IMD 200 or any otherdevice may iteratively test different pulse widths in order to identifywhich pulse widths elicit an ECAP signal that includes detectablefeatures of interest, such as the N2 and P3 peaks. Graph 550 alsoindicates that the latency is reduced between the artifact and N1 as thepulse width increases.

FIG. 6 is a timing diagram 600 illustrating one example of electricalstimulation pulses and respective sensed ECAPs, in accordance with oneor more techniques of this disclosure. For convenience, FIG. 6 isdescribed with reference to IMD 200 of FIG. 2 . As illustrated, timingdiagram 600 includes first channel 602, a plurality of stimulationpulses 604A-604N (collectively “stimulation pulses 604”), second channel606, a plurality of respective ECAPs 608A-608N (collectively “ECAPs608”), and a plurality of stimulation interference signals 609A-609N(collectively “stimulation interference signals 609”). In the example ofFIG. 6 , stimulation pulses 604 may be configured to contribute totherapy or not contribute to therapy. In any case, stimulation pulses604 may elicit respective ECAPs 608 for the purpose of determining acharacteristic value of the ECAPs representing a distance betweenelectrodes and nerve fibers.

First channel 602 is a time/voltage (and/or current) graph indicatingthe voltage (or current) of at least one electrode of electrodes 232,234. In one example, the stimulation electrodes of first channel 602 maybe located on the opposite side of the lead as the sensing electrodes ofsecond channel 606. Stimulation pulses 604 may be electrical pulsesdelivered to the spinal cord of the patient by at least one ofelectrodes 232, 234, and stimulation pulses 604 may be balanced biphasicsquare pulses with an interphase interval. In other words, each ofstimulation pulses 604 are shown with a negative phase and a positivephase separated by an interphase interval. For example, a stimulationpulse 604 may have a negative voltage for the same amount of time andamplitude that it has a positive voltage. It is noted that the negativevoltage phase may be before or after the positive voltage phase.Stimulation pulses 604 may be delivered according to instructions storedin storage device 212 of IMD 200.

In one example, stimulation pulses 604 may have a pulse width of lessthan approximately 300 microseconds (e.g., the total time of thepositive phase, the negative phase, and the interphase interval is lessthan 300 microseconds). In another example, stimulation pulses 604 mayhave a pulse width of approximately 100 µs for each phase of thebi-phasic pulse. In some examples, the pulse width of control pulses 604may be longer than 300 microseconds, as long as the pulse width does notinterfere with the detection of the desired one or more features of theelicited ECAPs 608. As illustrated in FIG. 6 , stimulation pulses 604may be delivered via channel 602. Delivery of stimulation pulses 604 maybe delivered by leads 230 in a guarded cathode electrode combination.For example, if leads 230 are linear 8-electrode leads, a guardedcathode combination is a central cathodic electrode with anodicelectrodes immediately adjacent to the cathodic electrode.

Second channel 606 is a time/voltage (and/or current) graph indicatingthe voltage (or current) of at least one electrode of electrodes 232,234. In one example, the electrodes of second channel 606 may be locatedon the opposite side of the lead as the electrodes of first channel 602.ECAPs 608 may be sensed at electrodes 232, 234 from the spinal cord ofthe patient in response to stimulation pulses 604. ECAPs 608 areelectrical signals which may propagate along a nerve away from theorigination of stimulation pulses 604. In one example, ECAPs 608 aresensed by different electrodes than the electrodes used to deliverstimulation pulses 604. As illustrated in FIG. 6 , ECAPs 608 may berecorded on second channel 606.

Stimulation interference signals 609A, 609B, and 609N (e.g., theartifact of the stimulation pulses) may be sensed by leads 230 and maybe sensed during the same period of time as the delivery of stimulationpulses 604. Since the interference signals may have a greater amplitudeand intensity than ECAPs 608, any ECAPs arriving at IMD 200 during theoccurrence of stimulation interference signals 609 may not be adequatelysensed by sensing circuitry 206 of IMD 200. However, ECAPs 608 may besufficiently sensed by sensing circuitry 206 because each ECAP 608, orat least a portion of ECAP 608 that includes one or more desiredfeatures of ECAP 608 that is used to detect the posture state and/or asfeedback for stimulation pulses 604, falls after the completion of eacha stimulation pulse 604. As illustrated in FIG. 6 , stimulationinterference signals 609 and ECAPs 608 may be recorded on channel 606.

FIG. 7 is a flow diagram illustrating an example technique forcontrolling delivery of stimulation if certain peaks are present in anECAP signal, in accordance with one or more techniques of thisdisclosure. IMD 200 and processing circuitry 210 will be described inthe example of FIG. 7 , but other IMDs such as IMD 110 or other devicesor systems may perform, or partially perform, the technique of FIG. 7 .

As shown in the example of FIG. 7 , processing circuitry 210 controlsstimulation circuitry to deliver a stimulation pulse (702). Processingcircuitry 210 may also control sensing circuitry to sense an ECAP signalresulting from the delivered stimulation pulse (704). Processingcircuitry 210 can then receive ECAP information from the sensingcircuitry that is representative of the ECAP signal (706). For example,the ECAP information may include a filtered and digitized version of theECAP signal.

From the ECAP information, processing circuitry 210 determines that theECAP signal includes at least one of an N2, P3, or N3 peak (708). Thesepeaks are latter occurring peaks than N1 or P2 peaks that may generallyhave larger amplitudes than the latter occurring peaks. However, N2, P3,or N3 peaks may enable wider pulse widths to be used for eliciting ECAPsignals. Processing circuitry 210 can then control delivery ofelectrical stimulation based on at least one of the N2, P3, or N3 peaks(710). For example, processing circuitry may determine thecharacteristic value of ECAP signals as the amplitude between the P2/N2peaks, N2/P3 peaks, or P3/N3 peaks. In some examples, the parameteradjusted during control may be a current amplitude or pulse width of thestimulation pulses. Processing circuitry 210 may continue to perform theprocess of FIG. 7 in a loop to continually use characteristic values ofECAP signals as feedback for adjusting stimulation pulses.

Processing circuitry 210 may use later occurring peaks for variousreasons. For example, earlier peaks (N1 and P2) may be affected by thestimulation artifact whereas latter occurring peaks are not (or affectedto a lesser extend). In other examples, short pulse width pulses mayrequire larger amplitudes in order to deliver a charge that elicits anECAP signal. However, the system may run out of head room to generate asufficient amplitude at the shorter pulse width or the patient mayperceive the amplitude has uncomfortable or otherwise unwanted. Thesystem may be able to deliver pulses with longer pulse widths having ashorter amplitude because the resulting overall delivered charge issufficient to elicit the ECAP signal. In these longer pulse widthsituations, later occurring peaks may be needed to detect the ECAPsignal amplitude due to artifact encumbrance on earlier occurring peaks.

FIG. 8 is a flow diagram illustrating an example technique for adjustingpulse width of stimulation pulses until desired peaks are detected inECAP signals, in accordance with one or more techniques of thisdisclosure. IMD 200 and processing circuitry 210 will be described inthe example of FIG. 8 , but other IMDs such as IMD 110 or other devicesor systems may perform, or partially perform, the technique of FIG. 8 .

As shown in the example of FIG. 8 , processing circuitry 210 receivesECAP information from the sensing circuitry that is representative ofthe ECAP signal (800). Processing circuitry 210 then analyzes the ECAPsignal for detectable peaks, such as N1, P2, N2, P3, N3, etc. (802). Iflater occurring peaks (e.g., N2, P3, N3, etc.) are not present in theECAP signal (“NO” branch of block 804), processing circuitry 210increases the pulse width of the next stimulation pulse as an attempt toelicit the later occurring peaks (806). If the later occurring peaks arepresent in the ECAP signal (“YES” branch of block 804), processingcircuitry 210 maintains the pulse width of the next stimulation pulses(808) and then determines the characteristic value of the ECAP signaland controls delivery of stimulation accordingly (810). In someexamples, processing circuitry 210 may look for specific peaks to use indetermining the characteristic value or look for a sufficient amplitudedifference between two specific peaks that may be caused by certainpulse widths.

Alternatively, the technique of FIG. 8 may be modified to reduce thepulse width until later occurring peaks are no longer present in theECAP signal. Processing circuitry 210 may perform such a technique inorder to identify pulse widths that are short enough to elicit N1 or P2peaks having sufficient amplitude that are no longer encumbered by thestimulation artifact. In other examples, other parameters may be changedin order to produce or remove the later occurring peaks. In someexamples, processing circuitry 210 may change the shape (e.g., square,triangle, gausian, ramped) of the pulses and/or the steepness of theramp up and/or down of the pulses in order to elicit the later occurringpeaks. In some examples, processing circuitry 210 may adjust theinterphase interval of a stimulation pulse in order to produce or removethe later occurring peaks. For example, processing circuitry 210 maylengthen the interphase interval between each positive and negativephase in order to elicit an ECAP signal that includes the lateroccurring peaks. Processing circuitry 210 may employ any one, orcombination, of these parameter adjustments in order to modulate thedetectable peaks in the ECAP signal.

For example, the parameter may be a current amplitude or pulse width ofthe stimulation pulses. Processing circuitry 210 may continue to performthe process of FIG. 8 in a loop to continually use characteristic valuesof ECAP signals as feedback for adjusting stimulation pulses.

FIG. 9 is a flow diagram illustrating an example technique for determinewhich peaks of an ECAP signal to use as feedback for controllingelectrical stimulation, in accordance with one or more techniques ofthis disclosure. IMD 200 and processing circuitry 210 will be describedin the example of FIG. 9 , but other IMDs such as IMD 110 or otherdevices or systems may perform, or partially perform, the technique ofFIG. 9 .

As shown in the example of FIG. 9 , processing circuitry 210 receivesECAP information from the sensing circuitry that is representative ofthe ECAP signal (900). Processing circuitry 210 then analyzes the ECAPsignal for peaks N1 and P2 (902). Processing circuitry 210 determinewhether either of peaks N1 or P2 are encumbered by the stimulationartifact (904). For example, processing circuitry 210 may determine thelatency, or time, from the stimulation artifact to one or both of N1 andP2 or the latency between the N1 and P2 peaks. If that latency is belowa threshold time, processing circuitry 210 may determine that thestimulation artifact has encumbered or affected the amplitudes of one orboth of the N1 or P2 peak. If one of N1 or P2 peaks are encumbered bythe stimulation artifact (“YES” branch of block 904), processingcircuitry 210 determines the characteristic value of the ECAP signalbased on a later peak in the ECAP signal (e.g., N2, P3, and/or N3)(908). In some examples, processing circuitry 210 may compare thelatency to multiple different threshold times that correspond to the useof different peaks that occur later in the ECAP signal. For example,processing circuitry 210 may use the earliest peaks in the ECAP signalthat are associated with a threshold time that the latency did not fallbelow. In other words, processing circuitry 210 may select the peaks inthe ECAP signal according to respective latency ranges for which thelatency falls within. Generally, it may be beneficial to use theearliest occurring peaks in the ECAP signal not encumbered by thestimulation artifact because amplitudes of peaks generally decrease asthe peaks occur later in time from the stimulation artifact.

If one of N1 or P2 peaks are not encumbered by the stimulation artifact(“NO” branch of block 904), processing circuitry 210 determines thecharacteristic value of the ECAP signal based on the N1 and P2 peaks(e.g., the amplitude difference between the N1 and P2 peaks) (906).Processing circuitry then controls delivery of stimulation based on thecharacteristic value of the ECAP signal (910) before receiving the nextECAP information (900).

FIG. 10 is a diagram illustrating an example technique for adjustingstimulation therapy, in accordance with one or more techniques of thisdisclosure. As shown in the example of FIG. 10 , the system, such as IMD200 or any other device or system described herein, may dynamicallyadjust a parameter value that defines stimulation pulses based on a gainvalue representing the patient sensitivity to stimulation. Processingcircuitry 210 of IMD 200 may control stimulation circuitry 202 todeliver a stimulation pulse to a patient (e.g., a control pulse fromwhich ECAP signals can be detected and may contribute to a therapeuticeffect). Processing circuitry 202 may then control sensing circuity 206to sense an ECAP signal elicited by the control pulse and then identifya characteristic value of the ECAP signal (e.g., an amplitude of theECAP signal). Processing circuitry 210 may then determine, based on thecharacteristic of the ECAP signal and a gain value, a parameter value(e.g., an amplitude, pulse width value, pulse frequency value, and/orslew rate value) that at least partially defines another control pulseand/or an informed pulse (not shown). Processing circuitry 210 may thencontrol stimulation circuitry 202 to deliver the next control pulseaccording to the determined parameter values.

As shown in FIG. 10 , a control pulse 1012 is delivered to the patientvia electrode combination 1014, shown as a guarded cathode of threeelectrodes. Control pulse 1012 may be configured to contribute to atherapeutic effect for the patient. The resulting ECAP signal is sensedby the two electrodes at the opposing end of the lead of electrodecombination 1016 fed to a differential amplifier 1018. For each sensedECAP signal, processing circuitry 210 may determine a characteristicvalue of the ECAP signal, such as the difference in amplitude betweenlater occurring peaks N2 and P3 the ECAP signal. In some examples, thecharacteristic value may be scaled to the amplitude of delivered pulsessince the values of the first derivative may not correspond in magnitudedirectly to amplitudes of pulses. Processing circuitry 210 may averagethe recently measured characteristic values 1020, such as averaging themost recent, and consecutive, 2, 3, 4, 5, 6, or more characteristicvalues. In some examples, the average may be a mean or median value. Insome examples, one or more characteristic values may be ignored from thecalculations if the characteristic value is determined to be an error.The characteristic value (or average measured characteristic value) isthen subtracted from the selected target characteristic value 1008 togenerate a differential value. The selected target characteristic value1008 may be determined from an ECAP sensed when the physician or patientinitially discovers effective therapy from the control pulses orinformed pulses. This target characteristic value 1008 may essentiallyrepresent a reference distance between the stimulation electrodes andthe target neurons (e.g., the spinal cord for the case of SCS). In someexamples, processing circuitry 210 may select the target characteristicvalue 1008 associated with a detected posture state, to the extent thetarget characteristic value would change for different posture states.

The differential value is then multiplied by the gain value for thepatient to generate a preliminary differential value 1010. Thepreliminary differential value is added to the ECAP pulse amplitude(e.g., the control pulse amplitude) to generate the new, or adjusted,ECAP pulse amplitude that at least partially defines the next controlpulse 1012. In some examples, processing circuitry 210 may adjustinformed pulses, in addition to control pulses, when the informed pulsesto not elicit detectable ECAP signals. For example, to adjust theinformed pulse amplitude, the differential value that was created aftermultiplication by the gain value 1010 is multiplied by a scaling factorto generate a therapy differential value. For example, the scalingfactor may be the ratio of the previously delivered informed pulseamplitude to the previously delivered control pulse amplitude. Thetherapy differential value is then added to the previously deliveredinformed pulse amplitude to generate the new, or adjusted, informedpulse amplitude that at least partially defines the next informed pulse.This process can be applied to the informed pulses from multiplestimulation programs. For example, if informed pulses from two differentstimulation programs are delivered as a part of stimulation therapy, thesystem may multiply the respective scaling factors by the differentialvalue to obtain a respective therapy differential value for the informedpulses of each stimulation program. The next informed pulse (or pulsesif multiple stimulation programs are involved in therapy) is thendelivered, interleaved with the control pulse 1012, to the patient viaelectrode combination 1014 or a different set of electrodes in otherexamples. In some examples, at least two control pulses may bedelivered, and at least two respective ECAP signals sensed, betweenconsecutive informed pulses. This increased frequency of control pulsesmay allow the system to quickly adjust informed pulse amplitudes for anychanges in the distance between electrodes and neurons.

Although the technique of FIG. 10 is described for adjusting theamplitude of the control pulses, other parameter values may be changedin other examples. For example, sensed ECAP signals may be used toincrease or decrease the pulse width of the control pulse to adjust theamount of charge delivered to the tissue to maintain consistent volumeof neural activation. In other examples, electrode combinations may beadjusted in order to deliver different amounts of charge and modify thenumber of neurons being recruited by each informed pulse. In otherexamples, processing circuitry 210 may be configured to adjust the slewrate of the control pulses (i.e., the rate of change of the voltageand/or amplitude at the beginning and/or end of the pulse or each phaseof the pulse) in response to a characteristic of the ECAP signal, suchas the amplitude of recent ECAP amplitudes.

FIG. 11 is a flow diagram illustrating the example technique foradjusting stimulation therapy as shown in the diagram of FIG. 10 . IMD200 and processing circuitry 210 will be described in the example ofFIG. 11 , but other IMDs such as IMD 110 or other devices or systems mayperform, or partially perform, the technique of FIG. 11 .

In the example of FIG. 11 , processing circuitry 210 determines thetarget ECAP amplitude (1102). The target characteristic value may bedetermined based on sample stimulation initially delivered to thepatient. The target characteristic value may be difference between themaximum and minimum values of the first derivative, for example, butother measures of ECAP amplitude may be used instead. In some examples,processing circuitry 210 is configured to automatically change thetarget characteristic value over a period of time according to apredetermined function (e.g., a sinusoid function) in order to changethe volume of neuron activation and, in some examples, the perceivedsensation of the informed pulses.

Processing circuitry 210 receives a measured characteristic value fromthe previously sensed ECAP signal. In order to use the ECAP signal asfeedback to control the next stimulation pulses of electricalstimulation therapy for the patient, processing circuitry 210 subtractsthe measured characteristic value from the target characteristic valueto generate a differential value (1104). In some examples, or asadditional measured characteristic value are available from the process,processing circuitry 210 may average a certain number of recent measuredcharacteristic values (e.g., two or more) to create a rolling average ofmeasured characteristic values and subtract the average characteristicvalues from the target characteristic value to smooth out variationsbetween ECAP signals. The differential value is thus a representation ofhow much the electrodes have moved relative to the neurons and can beused to adjust the amplitudes of the informed pulses and the controlpulses to maintain consistent volume of neural activation of the neuronsthat provide relief to the patient.

Processing circuitry 210 then multiplies the differential value by again value for the patient to generate a preliminary differential value(1106). Processing circuitry 210 then uses the preliminary differentialvalue to adjust the amplitudes of control pulses (and informed pulses ifnecessary). Processing circuitry 210 adds the preliminary differentialvalue to the control pulse amplitude to generate a new control pulseamplitude (1108). Processing circuitry 210 then controls stimulationcircuitry 202 to deliver a subsequent control pulse defined by the newcontrol pulse amplitude at a scheduled time, such as according to thefrequency of the control pulses or according to the next availablewindow between informed pulses (1110). Processing circuitry 210 alsocontrols sensing circuitry 206 to measure the amplitude of the sensedECAP elicited by the recently delivered control pulse (1112) to useagain as feedback in block 1104.

Although the technique of FIG. 11 is described for adjusting theamplitude of control pulses, a similar operation may be used to adjustother stimulation parameters in other examples. For example, parametersthat contribute to the intensity of the informed pulses and controlpulses may affect the volume of neural activation, such as pulse width,pulse frequency, or even pulse shape (e.g., the amount of charge perpulse). Therefore, processing circuitry 210 may adjust a differentparameter instead of, or in addition to, amplitude using the sensed ECAPsignal elicited from the control pulses. For example, processingcircuitry 210 may increase the pulse width of the informed pulses andcontrol pulses in response to detecting a decreased ECAP amplitude.

FIG. 12 is a flow diagram illustrating the example technique foradjusting stimulation therapy in accordance with one or more techniquesof this disclosure. For convenience, FIG. 12 is described with respectto IMD 200 of FIG. 2 . However, the techniques of FIG. 12 may beperformed by different components of IMD 200 or by additional oralternative medical devices. The technique of FIG. 12 is an examplefeedback mechanism for controlling stimulation therapy using sensed ECAPsignals.

As illustrated in FIG. 12 , processing circuitry 210 of IMD 200 maydetermine a target characteristic value (1202). The targetcharacteristic value may be stored in IMD 200. One example targetcharacteristic value may be the difference in amplitude between lateroccurring peaks N2 and P3 the ECAP signal. In other examples, processingcircuitry 210 may automatically change the target characteristic valueover a period of time according to a predetermined function (e.g., asinusoid function, step function, exponential function, or otherschedule). Processing circuitry 210 then delivers a stimulation pulseand senses the resulting ECAP elicited by the stimulation pulse (1204).Processing circuitry 210 then determines a representative characteristicvalue of one or more sensed ECAPs (1206). For example, therepresentative characteristic value may be the average amplitude of thelast four sensed ECAP characteristic values. However, the representativecharacteristic value may be from fewer or greater ECAPs.

Processing circuitry 210 then determines if the representativecharacteristic value of the one or more respective ECAP is greater thanthe upper-bound of target ECAP adjustment window (1208). As discussedherein, the target ECAP adjustment window may be defined by the targetECAP characteristic value plus and minus a variance. Therefore, thetarget ECAP characteristic value plus the variance may define theupper-bound of the target ECAP adjustment window. Similarly, the targetECAP characteristic value minus the variance may define the lower-boundof the target ECAP adjustment window. In this manner, the target ECAPadjustment window may be determined so that adjustments are not made tothe one or more parameters of the stimulation pulses for minoroscillations in the sensed ECAP characteristic value. If processingcircuitry 210 determines that the representative amplitude of the one ormore ECAPs is greater than the target ECAP characteristic value plus theadjustment window (“YES” branch of block 1208), processing circuitry 210decreases the amplitude of the next stimulation pulses (1210). Forexample, the amplitudes of the stimulation pulses may be decreased bypredetermined steps. As another example, the respective amplitudes ofthe stimulation pulses may be decreased by an amount proportional to thedifference between the representative amplitude and the target ECAPcharacteristic value. If processing circuitry 210 determines that therepresentative characteristic value is less than the upper-bound oftarget ECAP adjustment window, (“NO” branch of block 1208), processingcircuitry 210 moves to block 1212.

At block 1212, processing circuitry 210 determines if the representativecharacteristic value of the one or more respective ECAP is greater thanthe lower-bound of target ECAP adjustment window. If the representativeamplitude of the one or more respective ECAP is less than thelower-bound of target ECAP adjustment window (a “YES” branch of block1212), processing circuitry 210 increases the amplitude of thestimulation pulses by respective values (1214). For example, theamplitude of the stimulation pulse may be increased by predeterminedsteps. As another example, the amplitude of the stimulation pulses maybe increased by an amount proportional to the difference between therepresentative amplitude and the target ECAP characteristic value.Processing circuitry 210 then continues to deliver a stimulation pulseaccording to the increased or decreased amplitudes. In some examples,the decrease or increase applied to the stimulation pulses in steps 1210or 1214 may apply to the amplitude or other parameter of the nextscheduled stimulation pulse. In this manner, even if a decrease isapplied to the next stimulation pulse, the overall new amplitude of thenext stimulation pulses may still be greater than the previousstimulation pulse if the scheduled amplitude of the next stimulationpulse minus the decrease is still greater than the amplitude of theprevious stimulation pulse.

Although the process of FIG. 12 is described for adjusting the amplitudeof the stimulation pulses (e.g., control pulses and/or stimulationpulses), other parameter values may be changed in other examples. Forexample, sensed ECAP signals may be used to increase or decrease thepulse width of the stimulation pulse to adjust the amount of chargedelivered to the tissue to maintain consistent volume of neuralactivation. In other examples, electrode combinations may be adjusted inorder to deliver different amounts of charge and modify the number ofneurons being recruited by each informed pulse. In other examples,processing circuitry 210 may be configured to adjust the slew rate ofthe informed pulses (i.e., the rate of change of the voltage and/oramplitude at the beginning and/or end of the pulse or each phase of thepulse) in response to a characteristic of the ECAP signal being greaterthan or less than the target ECAP adjustment window. For example, if therepresentative characteristic value of the ECAP signal is greater thanthe upper-bound of the target ECAP adjustment window, processingcircuitry 210 may decrease the slew rate of the next stimulation pulses(i.e., ramp up the amplitude of the pulse more slowly). If therepresentative amplitude of the ECAP signal is lower than thelower-bound of the target ECAP adjustment window, processing circuitry210 may increase the slew rate of the next stimulation pulses (i.e.,ramp up the amplitude of the pulse more quickly). The slew rate maycontribute to the intensity of the pulse. Processing circuitry 210 maychange one or more parameters defining the stimulation pulse accordingto the process of operation 1000.

The following examples are described herein.

Example 1: A system including processing circuitry configured to:receive evoked compound action potential (ECAP) informationrepresentative of an ECAP signal sensed by sensing circuitry; determine,based on the ECAP information, that the ECAP signal includes at leastone of an N2 peak, P3 peak, or N3 peak; and control delivery ofelectrical stimulation based on at least one of the N2 peak, P3 peak, orN3 peak.

Example 2: The system of example 1, further including a stimulationgenerator configured to deliver a stimulation pulse to a patient; andthe sensing circuitry configured to sense the ECAP signal elicited fromthe stimulation pulse.

Example 3: The system of any of examples 1 and 2, wherein the processingcircuitry is configured to select at least one of the N2 peak, P3 peak,or N3 peak based on temporal proximity of a stimulus artifact in theECAP signal to at least one of the N2 peak, P3 peak, or N3 peak.

Example 4: The system of any of examples 1 through 3, wherein theprocessing circuitry is configured to select at least one of the N2peak, P3 peak, or N3 peak based on a pulse width of a stimulation pulsethat elicited the ECAP signal.

Example 5: The system of any of examples 1 through 4, wherein theprocessing circuitry is configured to determine a characteristic valueof the ECAP signal based on at least one of the N2 peak, P3 peak, or N3peak.

Example 6: The system of example 5, wherein the processing circuitry isconfigured to determine the characteristic value as an amplitude betweena P2 peak of the ECAP signal and the N2 peak.

Example 7: The system of any of examples 5 and 6, wherein the processingcircuitry is configured to determine the characteristic value as anamplitude between the N2 peak and the P3 peak.

Example 8: The system of any of examples 5 through 7, wherein theprocessing circuitry is configured to determine the characteristic valueas an amplitude between the P3 peak and the N3 peak.

Example 9: The system of any of examples 5 through 8, wherein theprocessing circuitry is configured to: determine a difference betweenthe characteristic value of the ECAP signal and a target ECAPcharacteristic value; and calculate, based on the difference, at leastone parameter value that at least partially defines the electricalstimulation.

Example 10: The system of example 9, wherein the processing circuitry isconfigured to control delivery of the electrical stimulation to apatient according to the at least one parameter value.

Example 11: The system of any of examples 1 through 10, furthercomprising an implantable medical device comprising the processingcircuitry.

Example 12: A method including receiving, by processing circuitry,evoked compound action potential (ECAP) information representative of anECAP signal sensed by sensing circuitry; determining, by the processingcircuitry and based on the ECAP information, that the ECAP signalincludes at least one of an N2 peak, P3 peak, or N3 peak; andcontrolling, by the processing circuitry, delivery of electricalstimulation based on at least one of the N2 peak, P3 peak, or N3 peak.

Example 13: The method of example 12, further including delivering, by astimulation generator, a stimulation pulse to a patient; and sensing, bythe sensing circuitry, the ECAP signal elicited from the stimulationpulse.

Example 14: The method of any of examples 12 and 13, further includingselecting at least one of the N2 peak, P3 peak, or N3 peak based ontemporal proximity of a stimulus artifact in the ECAP signal to at leastone of the N2 peak, P3 peak, or N3 peak.

Example 15: The method of any of examples 12 through 14, furtherincluding selecting at least one of the N2 peak, P3 peak, or N3 peakbased on a pulse width of a stimulation pulse that elicited the ECAPsignal.

Example 16: The method of any of examples 12 through 15, furthercomprising determining a characteristic value of the ECAP signal basedon at least one of the N2 peak, P3 peak, or N3 peak.

Example 17: The method of example 16, further comprising determining thecharacteristic value as an amplitude between a P2 peak of the ECAPsignal and the N2 peak.

Example 18: The method of any of examples 16 and 17, further comprisingdetermining the characteristic value as an amplitude between the N2 peakand the P3 peak.

Example 19: The method of any of examples 16 through 18, furthercomprising determining the characteristic value as an amplitude betweenthe P3 peak and the N3 peak.

Example 20: The method of any of examples 16 through 19, furtherincluding determining a difference between the characteristic value ofthe ECAP signal and a target ECAP characteristic value; and calculating,based on the difference, at least one parameter value that at leastpartially defines the electrical stimulation.

Example 21: The method of example 20, further comprising controllingdelivery of the electrical stimulation to a patient according to the atleast one parameter value.

Example 22: The method of any of examples 12 through 21, wherein animplantable medical device comprises the processing circuitry.

Example 23: A computer-readable medium comprising instructions that,when executed, causes processing circuitry to receive evoked compoundaction potential (ECAP) information representative of an ECAP signalsensed by sensing circuitry; determine, based on the ECAP information,that the ECAP signal includes at least one of an N2 peak, P3 peak, or N3peak; and control delivery of electrical stimulation based on at leastone of the N2 peak, P3 peak, or N3 peak.

The techniques described in this disclosure may be implemented, at leastin part, in hardware, software, firmware or any combination thereof. Forexample, various aspects of the described techniques may be implementedwithin one or more processors or processing circuitry, including one ormore microprocessors, digital signal processors (DSPs), applicationspecific integrated circuits (ASICs), field programmable gate arrays(FPGAs), or any other equivalent integrated or discrete logic circuitry,as well as any combinations of such components. The term “processor” or“processing circuitry” may generally refer to any of the foregoing logiccircuitry, alone or in combination with other logic circuitry, or anyother equivalent circuitry. A control unit including hardware may alsoperform one or more of the techniques of this disclosure.

Such hardware, software, and firmware may be implemented within the samedevice or within separate devices to support the various operations andfunctions described in this disclosure. In addition, any of thedescribed units, circuits or components may be implemented together orseparately as discrete but interoperable logic devices. Depiction ofdifferent features as circuits or units is intended to highlightdifferent functional aspects and does not necessarily imply that suchcircuits or units must be realized by separate hardware or softwarecomponents. Rather, functionality associated with one or more circuitsor units may be performed by separate hardware or software components orintegrated within common or separate hardware or software components.

The techniques described in this disclosure may also be embodied orencoded in a computer-readable medium, such as a computer-readablestorage medium, containing instructions that may be described asnon-transitory media. Instructions embedded or encoded in acomputer-readable storage medium may cause a programmable processor, orother processor, to perform the method, e.g., when the instructions areexecuted. Computer readable storage media may include random accessmemory (RAM), read only memory (ROM), programmable read only memory(PROM), erasable programmable read only memory (EPROM), electronicallyerasable programmable read only memory (EEPROM), flash memory, a harddisk, a CD-ROM, a floppy disk, a cassette, magnetic media, opticalmedia, or other computer readable media.

What is claimed is: 1-20. (canceled)
 21. A system comprising: processingcircuitry configured to: receive evoked compound action potential (ECAP)information representative of an ECAP signal sensed by sensingcircuitry; determine, based on the ECAP information, that the ECAPsignal includes at least one of an N2 peak, P3 peak, or N3 peak; selectat least one of the N2 peak, P3 peak, or N3 peak based on a pulse widthof a stimulation pulse that elicited the ECAP signal; and controldelivery of electrical stimulation based on the selected at least one ofthe N2 peak, P3 peak, or N3 peak.
 22. The system of claim 21, furthercomprising: a stimulation generator configured to deliver a stimulationpulse to a patient; and the sensing circuitry configured to sense theECAP signal elicited from the stimulation pulse.
 23. The system of claim21, wherein the processing circuitry is configured to select at leastone of the N2 peak, P3 peak, or N3 peak also based on temporal proximityof a stimulus artifact in the ECAP signal to at least one of the N2peak, P3 peak, or N3 peak.
 24. The system of claim 21, wherein theprocessing circuitry is configured to determine a characteristic valueof the ECAP signal based on an amplitude of the selected at least one ofthe N2 peak, P3 peak, or N3 peak.
 25. The system of claim 24, whereinthe selected at least one of the N2 peak, P3 peak, or N3 peak comprisesthe N2 peak, and wherein the processing circuitry is configured todetermine the characteristic value as an amplitude between a P2 peak ofthe ECAP signal and the N2 peak.
 26. The system of claim 24, wherein theselected at least one of the N2 peak, P3 peak, or N3 peak comprises theN2 peak and the P3 peak, and wherein the processing circuitry isconfigured to determine the characteristic value as an amplitude betweenthe N2 peak and the P3 peak.
 27. The system of claim 24, wherein theselected at least one of the N2 peak, P3 peak, or N3 peak comprises theN2 peak and the P3 peak and the N3 peak, and wherein the processingcircuitry is configured to determine the characteristic value as anamplitude between the P3 peak and the N3 peak.
 28. The system of claim24, wherein the processing circuitry is configured to: determine adifference between the characteristic value of the ECAP signal and atarget ECAP characteristic value; and calculate, based on thedifference, at least one parameter value that at least partially definesthe electrical stimulation.
 29. The system of claim 28, wherein theprocessing circuitry is configured to control delivery of the electricalstimulation to a patient according to the at least one parameter value.30. The system of claim 21, further comprising an implantable medicaldevice comprising the processing circuitry.
 31. A method comprising:receiving, by processing circuitry, evoked compound action potential(ECAP) information representative of an ECAP signal sensed by sensingcircuitry; determining, by the processing circuitry and based on theECAP information, that the ECAP signal includes at least one of an N2peak, P3 peak, or N3 peak; selecting, by the processing circuitry, atleast one of the N2 peak, P3 peak, or N3 peak based on a pulse width ofa stimulation pulse that elicited the ECAP signal; and controlling, bythe processing circuitry, delivery of electrical stimulation based on atleast one of the N2 peak, P3 peak, or N3 peak.
 32. The method of claim31, further comprising: delivering, by a stimulation generator, astimulation pulse to a patient; and sensing, by the sensing circuitry,the ECAP signal elicited from the stimulation pulse.
 33. The method ofclaim 31, further comprising selecting at least one of the N2 peak, P3peak, or N3 peak also based on temporal proximity of a stimulus artifactin the ECAP signal to at least one of the N2 peak, P3 peak, or N3 peak.34. The method of claim 31, further comprising determining acharacteristic value of the ECAP signal based on an amplitude of theselected at least one of the N2 peak, P3 peak, or N3 peak.
 35. Themethod of claim 34, wherein selecting at least one of the N2 peak, P3peak, or N3 peak comprises selecting the N2 peak, and further comprisingdetermining the characteristic value as an amplitude between a P2 peakof the ECAP signal and the N2 peak.
 36. The method of claim 34, whereinselecting at least one of the N2 peak, P3 peak, or N3 peak comprisesselecting the N2 peak and the P3 peak, and further comprisingdetermining the characteristic value as an amplitude between the N2 peakand the P3 peak.
 37. The method of claim 34, wherein selecting at leastone of the N2 peak, P3 peak, or N3 peak comprises selecting the P3 peakand the N3 peak, and further comprising determining the characteristicvalue as an amplitude between the P3 peak and the N3 peak.
 38. Themethod of claim 34, further comprising: determining a difference betweenthe characteristic value of the ECAP signal and a target ECAPcharacteristic value; and calculating, based on the difference, at leastone parameter value that at least partially defines the electricalstimulation.
 39. The method of claim 38, further comprising controllingdelivery of the electrical stimulation to a patient according to the atleast one parameter value.
 40. A computer-readable medium comprisinginstructions that, when executed, causes processing circuitry to:receive evoked compound action potential (ECAP) informationrepresentative of an ECAP signal sensed by sensing circuitry; determine,based on the ECAP information, that the ECAP signal includes at leastone of an N2 peak, P3 peak, or N3 peak; select at least one of the N2peak, P3 peak, or N3 peak based on a pulse width of a stimulation pulsethat elicited the ECAP signal; and control delivery of electricalstimulation based on at least one of the N2 peak, P3 peak, or N3 peak.